Skip to content

Commit f687969

Browse files
author
Kai Eichinger
committed
Upgrade dependencies + fix deprecations
1 parent fcf87d9 commit f687969

File tree

8 files changed

+44
-42
lines changed

8 files changed

+44
-42
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
command: COMPOSER_MEMORY_LIMIT=-1 composer normalize --indent-size 4 --indent-style space --dry-run
4141
- run:
4242
name: PHP CS Fixer
43-
command: ./vendor/bin/php-cs-fixer fix --diff --config vendor-bin/test/vendor/becklyn/php-cs/.php_cs.dist --dry-run --no-interaction
43+
command: ./vendor/bin/php-cs-fixer fix --diff --config vendor-bin/test/vendor/becklyn/php-cs/.php_cs.dist.php --dry-run --no-interaction
4444
- run:
4545
name: PHPUnit
4646
command: ./vendor/bin/simple-phpunit -c phpunit.xml --colors=always --testdox

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/vendor
55
/vendor-bin/*/composer.lock
66
/vendor-bin/*/vendor
7+
/.php-cs-fixer.cache

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
8.5.1
2+
=====
3+
4+
* (improvement) Fix Symfony 5.4 deprecations + remove unused fields/services
5+
* (internal) Upgrade dependencies.
6+
7+
18
8.5.0
29
=====
310

composer.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,45 @@
11
{
22
"name": "becklyn/rad",
3-
"type": "symfony-bundle",
43
"description": "RAD related functionality for usage in Symfony.",
5-
"homepage": "https://github.com/Becklyn/rad",
64
"license": "BSD-3-Clause",
5+
"type": "symfony-bundle",
76
"authors": [
87
{
98
"name": "Becklyn Studios",
109
"homepage": "http://becklyn.com/"
1110
}
1211
],
12+
"homepage": "https://github.com/Becklyn/rad",
1313
"require": {
14-
"php": "^7.4",
14+
"php": ">=7.4",
1515
"ext-json": "*",
16-
"beberlei/doctrineextensions": "^1.2",
16+
"beberlei/doctrineextensions": "^1.3.0",
1717
"becklyn/rad-bundles": "^1.0.1",
18-
"doctrine/doctrine-bundle": "^2.1",
19-
"doctrine/orm": "^2.7",
20-
"psr/log": "^1.1",
21-
"scienta/doctrine-json-functions": "^4.1",
22-
"symfony/config": "^5.1",
23-
"symfony/dependency-injection": "^5.1",
24-
"symfony/form": "^5.1",
25-
"symfony/http-kernel": "^5.1",
26-
"symfony/property-access": "^5.1",
27-
"symfony/translation-contracts": "^2.1",
28-
"symfony/validator": "^5.1",
29-
"twig/twig": "^3.0"
30-
},
31-
"conflict": {
32-
"becklyn/rad-bundle": "*"
18+
"doctrine/doctrine-bundle": "^2.3.2",
19+
"doctrine/orm": "^2.7.5",
20+
"psr/log": "^1.1.4",
21+
"scienta/doctrine-json-functions": "^4.4.0",
22+
"symfony/config": "^5.4.0",
23+
"symfony/dependency-injection": "^5.4.0",
24+
"symfony/form": "^5.4.0",
25+
"symfony/http-kernel": "^5.4.0",
26+
"symfony/property-access": "^5.4.0",
27+
"symfony/translation-contracts": "^2.5.0",
28+
"symfony/validator": "^5.4.0",
29+
"twig/twig": "^3.3.4"
3330
},
3431
"require-dev": {
35-
"algolia/search-bundle": "^4.1",
32+
"algolia/search-bundle": "^4.1.2",
3633
"roave/security-advisories": "dev-master",
37-
"symfony/phpunit-bridge": "^5.1",
38-
"symfony/twig-bridge": "^5.1"
34+
"symfony/phpunit-bridge": "^5.4.0",
35+
"symfony/twig-bridge": "^5.4.0"
36+
},
37+
"conflict": {
38+
"becklyn/rad-bundle": "*"
3939
},
4040
"suggest": {
4141
"symfony/twig-bridge": "To use the default form theme."
4242
},
43-
"config": {
44-
"sort-packages": true
45-
},
46-
"extra": {
47-
"branch-alias": {
48-
"dev-next": "8.x-dev"
49-
}
50-
},
5143
"autoload": {
5244
"psr-4": {
5345
"Becklyn\\Rad\\": "src/"
@@ -57,5 +49,13 @@
5749
"psr-4": {
5850
"Tests\\Becklyn\\Rad\\": "tests/"
5951
}
52+
},
53+
"config": {
54+
"sort-packages": true
55+
},
56+
"extra": {
57+
"branch-alias": {
58+
"dev-next": "8.x-dev"
59+
}
6060
}
6161
}

src/BecklynRadBundle.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@
55
use Becklyn\Rad\DependencyInjection\BecklynRadExtension;
66
use Becklyn\Rad\DependencyInjection\DoctrineExtensionsCompilerPass;
77
use Symfony\Component\DependencyInjection\ContainerBuilder;
8+
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
89
use Symfony\Component\HttpKernel\Bundle\Bundle;
910

10-
/**
11-
*
12-
*/
1311
class BecklynRadBundle extends Bundle
1412
{
1513
/**
1614
* @inheritDoc
1715
*/
18-
public function getContainerExtension ()
16+
public function getContainerExtension () : ?ExtensionInterface
1917
{
2018
return new BecklynRadExtension($this);
2119
}

src/Controller/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ protected function ajaxResponse (bool $ok, ?string $status = null) : AjaxRespons
149149
/**
150150
* @inheritDoc
151151
*/
152-
public static function getSubscribedServices ()
152+
public static function getSubscribedServices () : array
153153
{
154154
$services = parent::getSubscribedServices();
155155
$services[] = LoggerInterface::class;

src/Sortable/PropertiesSortableHandler.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414
final class PropertiesSortableHandler
1515
{
16-
private EntityRepository $repository;
1716
private SortableHandler $nested;
1817
/** @var string[] */
1918
private array $properties;
@@ -25,7 +24,6 @@ final class PropertiesSortableHandler
2524
*/
2625
public function __construct (EntityRepository $repository, string ...$properties)
2726
{
28-
$this->repository = $repository;
2927
$this->nested = new SortableHandler($repository);
3028
$this->properties = $properties;
3129
$this->accessor = PropertyAccess::createPropertyAccessor();
@@ -62,9 +60,7 @@ public function fixSortOrder (SortableEntityInterface $removedEntity) : void
6260
*/
6361
public function sortElementBefore (SortableEntityInterface $entity, ?SortableEntityInterface $before) : bool
6462
{
65-
return $this->areCompatible($entity, $before)
66-
? $this->nested->sortElementBefore($entity, $before, $this->buildWhere($entity))
67-
: false;
63+
return $this->areCompatible($entity, $before) && $this->nested->sortElementBefore($entity, $before, $this->buildWhere($entity));
6864
}
6965

7066

vendor-bin/test/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"becklyn/php-cs": "^6"
3+
"becklyn/php-cs": ">=17"
44
}
55
}

0 commit comments

Comments
 (0)