Skip to content

Commit

Permalink
Merge branch release/v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Dec 6, 2024
1 parent 1a6d324 commit 36f0d7b
Show file tree
Hide file tree
Showing 658 changed files with 8,108 additions and 12,204 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.2', '8.3']
steps:
- uses: shivammathur/setup-php@v2
with:
Expand All @@ -34,9 +34,7 @@ jobs:
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install Dependencies
run: composer install --no-scripts --no-ansi --no-interaction --no-progress
- name: Run PHP Code Sniffer
run: vendor/bin/phpcs -p ./src
run: composer install --no-ansi --no-interaction --no-progress
- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress -c phpstan.neon
- name: Run PHP Unit
Expand Down
54 changes: 27 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,54 +18,55 @@
"type": "symfony-bundle",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-zip": "*",
"ext-json": "*",
"api-platform/core": "~3.2.14",
"doctrine/annotations": "^1.0",
"ext-mbstring": "*",
"api-platform/core": "~3.3.11",
"doctrine/annotations": "^2.0",
"doctrine/doctrine-bundle": "^2.8.1",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "~2.19.0",
"gedmo/doctrine-extensions": "^3.10.0",
"doctrine/orm": "~2.20.0",
"gedmo/doctrine-extensions": "^3.16.1",
"inlinestyle/inlinestyle": "~1.2.7",
"james-heinrich/getid3": "^1.9",
"jms/serializer": "^3.9.0",
"jms/serializer-bundle": "^4.2.0",
"league/flysystem": "^3.0",
"league/flysystem-bundle": "^3.0",
"lexik/jwt-authentication-bundle": "^2.19",
"lexik/jwt-authentication-bundle": "^3.1.0",
"phpdocumentor/reflection-docblock": "^5.2",
"phpoffice/phpspreadsheet": "^1.15",
"ramsey/uuid": "^4.7",
"rezozero/intervention-request-bundle": "~3.0.0",
"rezozero/liform-bundle": "^0.19",
"rezozero/intervention-request-bundle": "~3.0.1",
"rezozero/liform-bundle": "^0.20.1",
"rezozero/tree-walker": "^1.5.0",
"roadiz/doc-generator": "2.3.*",
"roadiz/documents": "2.3.*",
"roadiz/dts-generator": "2.3.*",
"roadiz/entity-generator": "2.3.*",
"roadiz/jwt": "2.3.*",
"roadiz/markdown": "2.3.*",
"roadiz/models": "2.3.*",
"roadiz/doc-generator": "2.4.*",
"roadiz/documents": "2.4.*",
"roadiz/dts-generator": "2.4.*",
"roadiz/entity-generator": "2.4.*",
"roadiz/jwt": "2.4.*",
"roadiz/markdown": "2.4.*",
"roadiz/models": "2.4.*",
"roadiz/nodetype-contracts": "~1.1.2",
"roadiz/random": "2.3.*",
"rollerworks/password-common-list": "^0.2.0",
"rollerworks/password-strength-bundle": "^2.2",
"roadiz/random": "2.4.*",
"rollerworks/password-common-list": "^0.3.0",
"rollerworks/password-strength-bundle": "^3.0",
"scienta/doctrine-json-functions": "^4.2",
"sensio/framework-extra-bundle": "^6.1",
"solarium/solarium": "^6.0.4",
"symfony-cmf/routing-bundle": "^3.0.2",
"solarium/solarium": "^6.3.6",
"symfony-cmf/routing-bundle": "^3.1.0",
"symfony/asset": "6.4.*",
"symfony/cache": "6.4.*",
"symfony/console": "6.4.*",
"symfony/dotenv": "6.4.*",
"symfony/expression-language": "6.4.*",
"symfony/flex": "^2.2.3",
"symfony/flex": "^2.4.7",
"symfony/form": "6.4.*",
"symfony/framework-bundle": "6.4.*",
"symfony/http-client": "6.4.*",
"symfony/http-client-contracts": "^3.5",
"symfony/intl": "6.4.*",
"symfony/lock": "6.4.*",
"symfony/mailer": "6.4.*",
Expand All @@ -88,10 +89,10 @@
"symfony/web-link": "6.4.*",
"symfony/workflow": "6.4.*",
"symfony/yaml": "6.4.*",
"twig/extra-bundle": "^3.0",
"twig/extra-bundle": "^3.16",
"twig/intl-extra": "*",
"twig/string-extra": "*",
"twig/twig": "^3.1"
"twig/twig": "^3.16"
},
"replace": {
"roadiz/roadiz": "*"
Expand All @@ -101,7 +102,6 @@
"phpstan/phpstan": "^1.5.3",
"phpstan/phpstan-doctrine": "^1.3",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5",
"symfony/browser-kit": "6.4.*",
"symfony/phpunit-bridge": "^7.0",
"symfony/stopwatch": "6.4.*"
Expand Down Expand Up @@ -136,8 +136,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-main": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
73 changes: 53 additions & 20 deletions config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,78 @@
parameters:
env(HTTP_CACHE_STALE_WHILE_REVALIDATE): 3600
env(HTTP_CACHE_MAX_AGE): 60
env(HTTP_CACHE_SHARED_MAX_AGE): 600

api_platform:
patch_formats:
json: ['application/merge-patch+json']
enable_swagger_ui: false
title: "%env(string:APP_TITLE)%"
description: "%env(string:APP_DESCRIPTION)%"
version: '%env(string:APP_VERSION)%'
enable_swagger_ui: true
enable_re_doc: true
# Symfony inflector wrongly pluralizes "nodes_sources" to "nodes_sourcess"
keep_legacy_inflector: true
use_symfony_listeners: true
formats:
jsonld: ['application/ld+json']
json: ['application/json']
x-www-form-urlencoded: ['application/x-www-form-urlencoded']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
patch_formats:
json: [ 'application/merge-patch+json' ]
graphql:
introspection: '%kernel.debug%'
graphiql:
enabled: false
graphql_playground:
enabled: false
show_webby: false
swagger:
versions: [3]
title: "%env(string:APP_TITLE)%"
description: "%env(string:APP_DESCRIPTION)%"
version: '%env(string:APP_VERSION)%'
mapping:
paths:
- '%kernel.project_dir%/src/Entity'
- '%kernel.project_dir%/src/GeneratedEntity'
- '%kernel.project_dir%/vendor/roadiz/core-bundle/src/Entity'
- '%kernel.project_dir%/vendor/rezozero/tree-walker/src'
- '%kernel.project_dir%/config/api_resources'

collection:
pagination:
page_parameter_name: page
items_per_page_parameter_name: itemsPerPage

http_cache:
invalidation:
enabled: true
varnish_urls: [ '%env(VARNISH_URL)%' ]

swagger:
versions: [3]
defaults:
stateless: true
extra_properties:
standard_put: true
rfc_7807_compliant_errors: false
enable_max_depth: true
normalization_context:
skip_null_values: true
pagination_client_items_per_page: true
pagination_items_per_page: 15
pagination_maximum_items_per_page: 50
cache_headers:
# Automatically generate etags for API responses.
etag: true
public: true
# Default value for the response max age.
max_age: '%env(int:HTTP_CACHE_MAX_AGE)%'
# Default value for the response shared (proxy) max age.
shared_max_age: '%env(int:HTTP_CACHE_SHARED_MAX_AGE)%'
vary: [ 'Accept', 'Authorization', 'Origin', 'Accept-Encoding', 'Content-Type' ]
stale_while_revalidate: '%env(int:HTTP_CACHE_STALE_WHILE_REVALIDATE)%'
# Default values of the "Vary" HTTP header.
vary: ['Accept', 'Authorization', 'Origin', 'Accept-Encoding', 'Content-Type']
collection:
pagination:
items_per_page_parameter_name: itemsPerPage

when@prod:
api_platform:
graphql:
introspection: false
graphiql:
enabled: false
graphql_playground:
enabled: false
http_cache:
invalidation:
enabled: true
varnish_urls: [ '%env(VARNISH_URL)%' ]
1 change: 1 addition & 0 deletions config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ framework:
serializer:
circular_reference_handler: 'RZ\Roadiz\CoreBundle\Serializer\CircularReferenceHandler'
max_depth_handler: 'RZ\Roadiz\CoreBundle\Serializer\CircularReferenceHandler'
handle_all_throwables: true
csrf_protection:
enabled: true

Expand Down
10 changes: 10 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ security:
secret: '%kernel.secret%'
lifetime: 604800 # 1 week in seconds
path: /
# Enable login-link feature
# https://symfony.com/doc/current/security/login_link.html
login_link:
check_route: login_link_check
signature_properties: [ 'id', 'email' ]
# lifetime in seconds
lifetime: 300
# only allow the link to be used 3 times
max_uses: 3
success_handler: RZ\Roadiz\CoreBundle\Security\Authentication\BackofficeAuthenticationSuccessHandler
login_throttling:
max_attempts: 3
logout:
Expand Down
37 changes: 14 additions & 23 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
parameters:
roadiz_core.cms_version: '2.3.31'
roadiz_core.cms_version: '2.4.0'
roadiz_core.cms_version_prefix: 'main'
env(APP_NAMESPACE): "roadiz"
env(APP_VERSION): "0.1.0"
Expand Down Expand Up @@ -61,8 +61,11 @@ services:
- '../src/Traits/'
- '../src/Kernel.php'
- '../src/Tests/'
- '../src/DataCollector/'
- '../src/Event/'
- '../src/Model/'
- '../src/ListManager/'
- '../src/Serializer/Normalizer/'
- '../src/Importer/'

RZ\Roadiz\CoreBundle\EntityHandler\:
resource: '../src/EntityHandler/'
Expand Down Expand Up @@ -95,8 +98,6 @@ services:
tags: [ { name: 'roadiz_core.media_finder', platform: 'ted' } ]
RZ\Roadiz\CoreBundle\Document\MediaFinder\PodcastFinder:
tags: [ { name: 'roadiz_core.media_finder', platform: 'podcast' } ]
RZ\Roadiz\CoreBundle\Document\MediaFinder\TwitchEmbedFinder:
tags: [ { name: 'roadiz_core.media_finder', platform: 'twitch' } ]

# Removed DataTransformers
RZ\Roadiz\CoreBundle\Api\DataTransformer\:
Expand Down Expand Up @@ -178,16 +179,6 @@ services:
decorates: 'api_platform.serializer.normalizer.item'
decoration_priority: 21

RZ\Roadiz\CoreBundle\DataCollector\RequestDataCollector:
autoconfigure: false
arguments: [ '%roadiz_core.cms_version%', '%roadiz_core.cms_version_prefix%']
tags:
- name: data_collector
template: '@RoadizCore/DataCollector/request.html.twig'
# must match the value returned by the getName() method
id: 'roadiz.data_collector.request'
priority: 400

# Document
RZ\Roadiz\CoreBundle\Serializer\Normalizer\DocumentNormalizer:
# By default, .inner is passed as argument
Expand Down Expand Up @@ -412,11 +403,6 @@ services:
RZ\Roadiz\CoreBundle\SearchEngine\ClientRegistry:
arguments: ['@service_container']

RZ\Roadiz\CoreBundle\SearchEngine\SolariumLogger:
tags:
- { name: data_collector, template: '@RoadizCore/DataCollector/solarium.html.twig', id: 'solarium' }
- { name: monolog.logger, channel: solr }

RZ\Roadiz\CoreBundle\SearchEngine\Indexer\IndexerFactory:
arguments: ['@service_container']

Expand Down Expand Up @@ -455,7 +441,12 @@ services:
arguments: ['%kernel.project_dir%']
public: true

RZ\Roadiz\Random\PasswordGenerator: ~
RZ\Roadiz\Random\PasswordGeneratorInterface:
class: RZ\Roadiz\Random\PasswordGenerator
RZ\Roadiz\Random\SaltGeneratorInterface:
class: RZ\Roadiz\Random\SaltGenerator
RZ\Roadiz\Random\TokenGeneratorInterface:
class: RZ\Roadiz\Random\TokenGenerator

JMS\Serializer\Construction\ObjectConstructorInterface:
alias: RZ\Roadiz\CoreBundle\Serializer\ObjectConstructor\ObjectConstructor
Expand All @@ -480,9 +471,6 @@ services:
Solarium\Core\Client\Client:
factory: ['RZ\Roadiz\CoreBundle\SearchEngine\ClientRegistry', 'getClient']

RZ\Roadiz\CoreBundle\Security\Authentication\JwtAuthenticationSuccessHandler:
decorates: 'lexik_jwt_authentication.handler.authentication_success'

RZ\Roadiz\CoreBundle\Security\Authorization\Chroot\NodeChrootResolver:
alias: RZ\Roadiz\CoreBundle\Security\Authorization\Chroot\NodeChrootChainResolver

Expand Down Expand Up @@ -534,6 +522,7 @@ services:
#
RZ\Roadiz\CoreBundle\Document\MediaFinder\UnsplashPictureFinder:
arguments:
- '@http_client'
- '%roadiz_core.medias.unsplash_client_id%'
RZ\Roadiz\Documents\MediaFinders\RandomImageFinder:
alias: RZ\Roadiz\CoreBundle\Document\MediaFinder\UnsplashPictureFinder
Expand All @@ -557,6 +546,7 @@ services:
tags: [ 'roadiz_core.document_renderer' ]
RZ\Roadiz\Documents\Renderer\RendererInterface:
alias: RZ\Roadiz\Documents\Renderer\ChainRenderer
RZ\Roadiz\Documents\MediaFinders\FacebookPictureFinder:

# Default AbstractDocumentFactory is the public one.
RZ\Roadiz\Documents\AbstractDocumentFactory:
Expand Down Expand Up @@ -655,6 +645,7 @@ services:

RZ\Roadiz\Documents\MediaFinders\EmbedFinderFactory:
arguments:
- '@http_client'
- '%roadiz_core.medias.supported_platforms%'

RZ\Roadiz\Documents\Renderer\ChainRenderer:
Expand Down
Loading

0 comments on commit 36f0d7b

Please sign in to comment.