Skip to content

Commit efa82f5

Browse files
committed
Merge branch 'cs-fixes'
2 parents e764646 + 796927f commit efa82f5

21 files changed

+91
-87
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/.github/
22
/.idea/
3+
/.phpunit.cache/
4+
/config/dirigent.json
5+
/config/dirigent.php
36
/config/dirigent.yaml
7+
/config/dirigent.yml
48
/config/packages/dirigent.yaml
59
/node_modules/
610
/public/build/

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Documentation files
22
docs/** linguist-documentation
3-
changelogd.md linguist-documentation
3+
changelog.md linguist-documentation
44
license.md linguist-documentation
55
readme.md linguist-documentation
66

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/.env
22
/compose.override.yaml
3+
/config/dirigent.json
4+
/config/dirigent.php
35
/config/dirigent.yaml
6+
/config/dirigent.yml
47
/config/packages/dirigent.yaml
58
/storage/
69

phpstan.dist.neon

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ parameters:
33
paths:
44
- bin/
55
- config/
6+
- migrations/
67
- public/
78
- src/
89
- tests/
910
excludePaths:
1011
- tests/bootstrap.php
1112
ignoreErrors:
12-
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children\(\).#'
13-
- '#Property CodedMonkey\\Dirigent\\Doctrine\\Entity\\[a-zA-Z]+::\$id \(int\|null\) is never assigned int so it can be removed from the property type.#'
13+
- '#^Property CodedMonkey\\Dirigent\\Doctrine\\Entity\\[a-zA-Z]+\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
14+
-
15+
message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#'
16+
identifier: method.notFound
17+
count: 1
18+
path: src/DependencyInjection/DirigentConfiguration.php

phpunit.dist.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="tests/bootstrap.php"
9-
cacheDirectory=".phpunit.cache"
4+
<phpunit
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
7+
bootstrap="tests/bootstrap.php"
8+
cacheDirectory=".phpunit.cache"
9+
colors="true"
1010
>
1111
<php>
1212
<ini name="display_errors" value="1" />
@@ -26,7 +26,7 @@
2626
</testsuite>
2727
</testsuites>
2828

29-
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
29+
<source restrictNotices="true" restrictWarnings="true">
3030
<include>
3131
<directory>src</directory>
3232
</include>

phpunit.docker.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
colors="true"
6-
bootstrap="tests/bootstrap.php"
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
bootstrap="tests/bootstrap.php"
7+
cacheDirectory=".phpunit.cache"
8+
colors="true"
79
>
810
<php>
911
<ini name="display_errors" value="1" />

src/EventListener/DashboardRoutingListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(
1919
}
2020

2121
#[AsEventListener]
22-
public function onKernelRequest(RequestEvent $event): void
22+
public function redirectPrettyDashboardUrls(RequestEvent $event): void
2323
{
2424
$request = $event->getRequest();
2525

src/EventListener/SecurityEventListener.php renamed to src/EventListener/SecurityListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials;
1414
use Symfony\Component\Security\Http\Event\CheckPassportEvent;
1515

16-
readonly class SecurityEventListener
16+
readonly class SecurityListener
1717
{
1818
public function __construct(
1919
private AccessTokenRepository $accessTokenRepository,

src/Kernel.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,24 @@ protected function configureContainer(ContainerConfigurator $container): void
2020

2121
$container->import($configDir . '/packages/*.yaml');
2222
$container->import($configDir . '/services.yaml');
23-
$container->import($configDir . '/dirigent.{json,php,yaml}');
23+
$container->import($configDir . '/dirigent.{json,php,yml,yaml}');
2424

2525
if (isset($_SERVER['DIRIGENT_IMAGE'])) {
26-
$container->import('/srv/config/*.{json,php,yaml}');
26+
$container->import('/srv/config/*.{json,php,yml,yaml}');
2727
}
2828
}
2929

30+
protected function build(ContainerBuilder $container): void
31+
{
32+
$container->registerExtension(new DirigentExtension());
33+
}
34+
3035
public function boot(): void
3136
{
3237
parent::boot();
3338

39+
// Set Composer env vars
3440
$_SERVER['COMPOSER_CACHE_DIR'] = $this->container->getParameter('dirigent.storage.path') . '/composer-cache';
3541
$_SERVER['COMPOSER_HOME'] = $this->container->getParameter('dirigent.storage.path') . '/composer';
3642
}
37-
38-
protected function build(ContainerBuilder $container): void
39-
{
40-
$container->registerExtension(new DirigentExtension());
41-
}
4243
}

src/Package/PackageMetadataResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ private function updateReadme(Version $version, VcsDriverInterface $driver): voi
403403

404404
break;
405405
}
406-
} catch (\Exception $e) {
407-
throw $e; // todo handle politely
406+
} catch (\Exception $exception) {
407+
throw $exception; // todo handle politely
408408
}
409409
}
410410

0 commit comments

Comments
 (0)