Skip to content

Commit 8312f3a

Browse files
Merge pull request #221 from symfony-cmf/php-5.6
Php 5.6
2 parents a48f8b2 + e1bd3d6 commit 8312f3a

26 files changed

+337
-443
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
64
- 7.0
75
- hhvm
86

@@ -18,10 +16,11 @@ env:
1816
global:
1917
- SYMFONY_DEPRECATIONS_HELPER=42
2018
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
19+
- SYMFONY_PHPUNIT_VERSION=5.7
2120

2221
matrix:
2322
include:
24-
- php: 5.5
23+
- php: 5.6
2524
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
2625
- php: 7.1
2726
env: DEPS=dev SYMFONY_VERSION=3.3.*

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Changelog
22
=========
33

4+
* **2017-01-17**: [BC BREAK] Removed DoctrineOrmMappingsPass - all active Doctrine versions contain the mapping pass. Use `Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass` instead.
45
* **2017-01-13**: [BC BREAK] Removed the `Slugifier` classes and the
56
dependency on `symfony-cmf/slugifier-api`.
67
* **2016-12-03**: [BC BREAK] Moved sonata admin related classes and

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^5.5.9|^7.0",
15+
"php": "^5.6.0|^7.0",
1616
"symfony/framework-bundle": "^2.8|^3.0"
1717
},
1818
"require-dev": {

src/DependencyInjection/CmfCoreExtension.php

Lines changed: 99 additions & 95 deletions
Large diffs are not rendered by default.

src/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php

Lines changed: 0 additions & 118 deletions
This file was deleted.

src/Doctrine/Phpcr/NonTranslatableMetadataListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class NonTranslatableMetadataListener implements EventSubscriber
2828
*/
2929
public function getSubscribedEvents()
3030
{
31-
return array(
31+
return [
3232
'loadClassMetadata',
33-
);
33+
];
3434
}
3535

3636
/**
@@ -51,7 +51,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
5151
foreach ($meta->translatableFields as $field) {
5252
unset($meta->mappings[$field]['translated']);
5353
}
54-
$meta->translatableFields = array();
54+
$meta->translatableFields = [];
5555
if (null !== $meta->localeMapping) {
5656
unset($meta->mappings[$meta->localeMapping]);
5757
$meta->localeMapping = null;

src/Doctrine/Phpcr/TranslatableMetadataListener.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Doctrine\Common\EventSubscriber;
1515
use Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs;
1616
use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
17+
use Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface;
1718

1819
/**
1920
* Metadata listener for when the translations are globally defined.
@@ -40,9 +41,9 @@ public function __construct($translationStrategy)
4041
*/
4142
public function getSubscribedEvents()
4243
{
43-
return array(
44+
return [
4445
'loadClassMetadata',
45-
);
46+
];
4647
}
4748

4849
/**
@@ -55,7 +56,7 @@ public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
5556
/** @var $meta ClassMetadata */
5657
$meta = $eventArgs->getClassMetadata();
5758

58-
if ($meta->getReflectionClass()->implementsInterface('Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface')) {
59+
if ($meta->getReflectionClass()->implementsInterface(TranslatableInterface::class)) {
5960
$meta->setTranslator($this->translationStrategy);
6061
}
6162
}

src/EventListener/PublishWorkflowListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public function onKernelRequest(GetResponseEvent $event)
9191
*/
9292
public static function getSubscribedEvents()
9393
{
94-
return array(
95-
KernelEvents::REQUEST => array(array('onKernelRequest', 1)),
96-
);
94+
return [
95+
KernelEvents::REQUEST => [['onKernelRequest', 1]],
96+
];
9797
}
9898
}

src/Form/Type/CheckboxUrlLabelFormType.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public function __construct(RouterInterface $router)
5454
public function buildView(FormView $view, FormInterface $form, array $options)
5555
{
5656
$routes = $options['routes'];
57-
$paths = array();
57+
$paths = [];
5858
foreach ($routes as $key => $route) {
5959
$name = isset($route['name']) ? $route['name'] : null;
60-
$parameters = isset($route['parameters']) ? $route['parameters'] : array();
60+
$parameters = isset($route['parameters']) ? $route['parameters'] : [];
6161
$referenceType = isset($route['referenceType']) ? $route['referenceType'] : UrlGeneratorInterface::ABSOLUTE_PATH;
6262
$paths[$key] = $this->router->generate($name, $parameters, $referenceType);
6363
}
@@ -75,9 +75,9 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
7575

7676
public function configureOptions(OptionsResolver $resolver)
7777
{
78-
$resolver->setDefaults(array(
79-
'routes' => array(),
80-
));
78+
$resolver->setDefaults([
79+
'routes' => [],
80+
]);
8181
}
8282

8383
/**

src/PublishWorkflow/PublishWorkflowChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function supportsClass($class)
112112
public function isGranted($attributes, $object = null)
113113
{
114114
if (!is_array($attributes)) {
115-
$attributes = array($attributes);
115+
$attributes = [$attributes];
116116
}
117117

118118
if (1 === count($attributes)

0 commit comments

Comments
 (0)