Skip to content

Commit ce0e966

Browse files
authored
Merge pull request #581 from caesar-team/develop
Release v2.1.0
2 parents 16674d6 + 4a170e2 commit ce0e966

File tree

99 files changed

+2005
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2005
-303
lines changed

.env.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,12 @@ FINGERPRINT_LIFETIME=1209600
8686
###> symfony/messenger ###
8787
MESSENGER_TRANSPORT_DSN=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RABBITMQ_HOST}:5672/%2f/messages?connection_timeout=1&lazy=true
8888
###< symfony/messenger ###
89+
90+
###> symfony/mercure-bundle ###
91+
MERCURE_EXTERNAL_PORT=3000
92+
## See https://symfony.com/doc/current/mercure.html#configuration
93+
MERCURE_PUBLISH_URL=http://mercure/.well-known/mercure
94+
# The default token is signed with the secret key: !ChangeMe!
95+
MERCURE_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOltdfX0.Oo0yg7y4yMa1vr_bziltxuTCqb8JVHKxp-f_FwwOim0
96+
MERCURE_JWT_SECRET=!ChangeMe!
97+
###< symfony/mercure-bundle ###

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ codeception.yml
3838
###< tests ###
3939
src/.preload.php
4040
.vscode/settings.json
41+
42+
###> symfony/mercure-bundle ###
43+
config/mercure/caddy
44+
###< symfony/mercure-bundle ###

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"symfony/flex": "1.9.10",
4444
"symfony/framework-bundle": "4.4.15",
4545
"symfony/http-foundation": "4.4.15",
46+
"symfony/mercure-bundle": "^0.2.6",
4647
"symfony/messenger": "4.4.15",
4748
"symfony/monolog-bundle": "3.6.0",
4849
"symfony/orm-pack": "1.2.0",
@@ -110,6 +111,10 @@
110111
"@php vendor/bin/php-cs-fixer fix --config=.php_cs.dist -vv",
111112
"@php vendor/bin/phpstan analyse --memory-limit=-1",
112113
"@php vendor/bin/psalm --show-info=false"
114+
],
115+
"test": [
116+
"@analyse",
117+
"@php vendor/bin/codecept run"
113118
]
114119
},
115120
"conflict": {

composer.lock

Lines changed: 240 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@
3232
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
3333
Yoanm\SymfonyJsonRpcParamsValidator\JsonRpcParamsValidatorBundle::class => ['all' => true],
3434
Fourxxi\RestRequestError\RestRequestErrorBundle::class => ['all' => true],
35+
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
3536
];

config/docker/php/symfony.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ realpath_cache_size = 8192k
44
realpath_cache_ttl = 600
55
opcache.memory_consumption = 256
66
opcache.max_accelerated_files = 40000
7-
extension=gnupg.so
7+
extension=gnupg.so
8+
post_max_size=100M

config/mercure/Caddyfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# The address of your server
2+
localhost
3+
4+
route {
5+
mercure {
6+
publisher_jwt {$MERCURE_JWT_SECRET}
7+
subscriber_jwt {$MERCURE_JWT_SECRET}
8+
cors_origins {$CORS_ALLOW_ORIGIN}
9+
}
10+
11+
respond "Not Found" 404
12+
}

config/packages/doctrine.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ doctrine:
1010
types:
1111
uuid: Ramsey\Uuid\Doctrine\UuidType
1212
NodeEnumType: App\DBAL\Types\Enum\NodeEnumType
13+
DirectoryEnumType: App\DBAL\Types\Enum\DirectoryEnumType
1314
AccessEnumType: App\DBAL\Types\Enum\AccessEnumType
1415
orm:
1516
auto_generate_proxy_classes: '%kernel.debug%'

config/packages/mercure.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mercure:
2+
enable_profiler: '%kernel.debug%'
3+
hubs:
4+
default:
5+
url: '%env(MERCURE_PUBLISH_URL)%'
6+
jwt: '%env(MERCURE_JWT_TOKEN)%'

config/services.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
parameters:
22
'env(FINGERPRINT_LIFETIME)': 86400
33
'env(BACKUP_CODE_SALT)': ''
4+
'env(OAUTH_ALLOWED_DOMAINS)': ''
45
services:
56
# default configuration for services in *this* file
67
_defaults:
78
autowire: true # Automatically injects dependencies in your services.
89
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
910
public: false # Allows optimizing the container by removing unused services; this also means
10-
# fetching services directly from the container via $container->get() won't work.
11-
# The best practice is to be explicit about your dependencies anyway.
11+
bind:
12+
$allowedDomains: '%env(OAUTH_ALLOWED_DOMAINS)%'
1213

1314
# makes classes in src/ available to be used as services
1415
# this creates a service per class whose id is the fully-qualified class name

0 commit comments

Comments
 (0)