Skip to content

Commit

Permalink
Merge branch 'release/v2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Dec 12, 2023
2 parents 218ec16 + e1a317b commit e309974
Show file tree
Hide file tree
Showing 46 changed files with 1,409 additions and 888 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ docker-compose.standalone.yml
*/*/temp*
docker
.vagrant
.data
.idea
var/sessions/*
var/log/*
var/cache/*
Expand Down
16 changes: 15 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ LOCK_DSN=flock
###> symfony/messenger ###
# Choose one of the transports below
#MESSENGER_TRANSPORT_DSN=doctrine://default
MESSENGER_FAILED_TRANSPORT_DSN=doctrine://default?queue_name=failed
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
MESSENGER_TRANSPORT_DSN=redis://redis:6379/messages
# When using symfony server:start
Expand All @@ -94,6 +95,7 @@ MAILER_DSN=smtp://mailer:1025?encryption=&auth_mode=
APP_TITLE="Roadiz skeleton"
APP_DESCRIPTION="Roadiz skeleton"
APP_NAMESPACE=roadiz_skeleton
APP_ROUTER_DEFAULT_URI=http://roadiz-skeleton.test
APP_CACHE=0
APP_UNSPLASH_CLIENT_ID=
APP_VERSION=0.1.0
Expand All @@ -117,7 +119,8 @@ APP_USE_ACCEPT_LANGUAGE_HEADER=false
OPEN_ID_DISCOVERY_URL=
OPEN_ID_HOSTED_DOMAIN=
OPEN_ID_CLIENT_ID=
OPEN_ID_CLIENT_SECRET=
## Define this secret value with Symfony secret and Vault
#OPEN_ID_CLIENT_SECRET=
###< roadiz/rozier-bundle ###

###> rezozero/intervention-request-bundle ###
Expand All @@ -139,6 +142,10 @@ REDIS_DSN=redis://redis:6379
#REDIS_DSN=redis://127.0.0.1:6379
###< symfony/framework-bundle ###

###> symfony/notifier ###
DEFAULT_ADMIN_NOTIFIER_RECIPIENT=admin@example.test
###< symfony/notifier ###

###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
Expand All @@ -155,3 +162,10 @@ DATABASE_URL="mysql://roadiz:roadiz@db:3306/roadiz?serverVersion=8&charset=utf8m
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8"
###< doctrine/doctrine-bundle ###

## Restic backup configuration
#S3_ACCESS_KEY=
#S3_SECRET_KEY=
#S3_STORAGE_CLASS=STANDARD
#RESTIC_PASSWORD=
RESTIC_REPOSITORY=
MYSQL_DUMP_FILENAME=api_database_dump.sql
2 changes: 2 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
###> sentry/sentry-symfony ###
SENTRY_DSN=
###< sentry/sentry-symfony ###

APP_ROUTER_DEFAULT_URI=https://roadiz-skeleton.test
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## [v2.2.0](https://github.com/roadiz/skeleton/compare/v2.1.15...v2.2.0) (2023-12-12)


### Features

* Added `APP_ROUTER_DEFAULT_URI` to configure framework.router.default_uri ([67ef138](https://github.com/roadiz/skeleton/commit/67ef1389069144257f43cc2df59da799a58902c7))
* Added Restic services for production backup and restoration in development env ([fc28b13](https://github.com/roadiz/skeleton/commit/fc28b134f03e7bebeaec778ef673d8755f889daf))
* Do not expose WebResponse resource directly ([a972b80](https://github.com/roadiz/skeleton/commit/a972b80a02e9e65e37f1fbc36d5f20c1c333a14c))
* Do not use `themes:install` and `themes:migrate` command anymore as Roadiz will generate Doctrine migration at node-type changes ([09b1714](https://github.com/roadiz/skeleton/commit/09b171417d68349c0a77b0d05dd2318c73627af6))
* Requires php 8.1 minimum ([424783d](https://github.com/roadiz/skeleton/commit/424783d01f95fa3c80536f372ccbc9e67a150217))
* **Solr:** Added *_ps field type for multiple geolocations ([2c9f5e3](https://github.com/roadiz/skeleton/commit/2c9f5e36c6f0e81a05130c83f94d5872bc99478e))
* **Solr:** Better Solr managed schema for French fields asciifolding ([141186c](https://github.com/roadiz/skeleton/commit/141186cd0743233e4283ebc5be0b7fd611846232))
* Switched to php 82 ([8824e7e](https://github.com/roadiz/skeleton/commit/8824e7e9f21338c86ec6b47328fa808f03bc8835))
* Updated docker-php-entrypoint to perform db migrations first then app:install ([4b2079a](https://github.com/roadiz/skeleton/commit/4b2079a5dbad0f17f3f91be822d5a02be663b6f4))
* Updated README and Makefile for new `app:migrate` command, disabled default Varnish invalidation ([b34cf42](https://github.com/roadiz/skeleton/commit/b34cf42f8b03879bc3152653d8819d63e3e72ca9))
* Upgraded configuration for Roadiz 2.2 ([8ef0d3f](https://github.com/roadiz/skeleton/commit/8ef0d3f18a74f78dd99df94c2d029ee5b1cd0a4b))


### Bug Fixes

* Configure API firewall as database-less JWT by default to ensure PreviewUser are not reloaded. Missing `user_checker` ([23d64e4](https://github.com/roadiz/skeleton/commit/23d64e49b613286f1a7b1818c8fbbea5db336dfa))
* **Docker:** Clear caches after migrations and db ready ([91c6220](https://github.com/roadiz/skeleton/commit/91c62209a44ac4a6fc092e4cd1ffe57cf9e70a1d))
* Fix docker compose watchtower depends-on labels ([f5afbd3](https://github.com/roadiz/skeleton/commit/f5afbd38294523b7d9ca4a6faa7ae87af49be54b))
* Force watchtower to restart dependent containers ([a2b0357](https://github.com/roadiz/skeleton/commit/a2b0357f1ff1a8c6032b5e77b5b6d5f77c0c449e))
* Removed deprecated `lexik_jwt_authentication.jwt_token_authenticator` ([42850a0](https://github.com/roadiz/skeleton/commit/42850a0cfe79628557c1454b65c75e2d4c78e57b))
* Set default empty dotenv vars for OpenID and ignore large files and archives from Varnish cache ([94f3975](https://github.com/roadiz/skeleton/commit/94f3975ccdfdf5369acf1cbae7ea7a013ab5196b))
* Use VARNISH_HOST instead of URL for reverseProxyCache host param ([5af0965](https://github.com/roadiz/skeleton/commit/5af0965020325714737c11b23c7b95c52b8fc63f))

## [v2.1.15](https://github.com/roadiz/skeleton/compare/v2.1.14...v2.1.15) (2023-09-20)


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM roadiz/php81-fpm-alpine:latest
FROM roadiz/php82-fpm-alpine:latest
MAINTAINER Ambroise Maupate <ambroise@rezo-zero.com>
ARG USER_UID=1000
ENV APP_ENV=prod
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test:

migrate:
docker compose exec -u www-data app php bin/console doctrine:migrations:migrate
docker compose exec -u www-data app php bin/console themes:migrate ./src/Resources/config.yml
docker compose exec -u www-data app php bin/console app:migrate
# Stop workers to force restart them (Supervisord)
docker compose exec -u www-data app php bin/console messenger:stop-workers

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Or manually:
# Create Roadiz database schema
docker compose exec -u www-data app bin/console doctrine:migrations:migrate
# Migrate any existing data types
docker compose exec -u www-data app bin/console themes:migrate ./src/Resources/config.yml
docker compose exec -u www-data app bin/console app:install
# Install base Roadiz fixtures, roles and settings
docker compose exec -u www-data app bin/console install
# Clear cache
Expand Down Expand Up @@ -191,9 +191,9 @@ You will need to use at least *MySQL* and *Redis* (and *Solr* if needed) service
docker compose -f docker-compose.symfony.yml up -d
```

And configure your `.env` variables to use your local MySQL and Redis services.
Replacing `db`, `redis`, `mailer` and `solr` hostnames with `127.0.0.1`. Make sure to use `127.0.0.1` and not `localhost`
on *macOS* as it will not work with Docker.
- Configure your `.env` variables to use your local MySQL and Redis services. Replacing `db`, `redis`, `mailer` and `solr` hostnames with `127.0.0.1`. Make sure to use `127.0.0.1` and not `localhost` on *macOS* as it will not work with Docker.
- Remove `docker compose exec -u www-data app ` prefix from all commands in `Makefile` to execute recipes locally.
- Remove cache invalidation Varnish configuration from `config/packages/api_platform.yaml` and `config/packages/roadiz_core.yaml` file.

Then you can start your local webserver:

Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "mit",
"prefer-stable": true,
"require": {
"php": ">=8.0",
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
Expand Down Expand Up @@ -65,7 +65,8 @@
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"themes:assets:install Rozier": "symfony-cmd"
"themes:assets:install Rozier": "symfony-cmd",
"requirements-checker": "script"
},
"post-install-cmd": [
"@auto-scripts"
Expand All @@ -83,6 +84,11 @@
"conflict": {
"symfony/symfony": "*"
},
"suggest": {
"roadiz/two-factor-bundle": "Provides a two-factor authentication system for Roadiz CMS",
"roadiz/user-bundle": "Public user management bundle for Roadiz CMS",
"roadiz/font-bundle": "Manage and expose web fonts with Roadiz CMS"
},
"extra": {
"symfony": {
"allow-contrib": false,
Expand Down
10 changes: 8 additions & 2 deletions composer.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "mit",
"prefer-stable": true,
"require": {
"php": ">=8.0",
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
Expand Down Expand Up @@ -65,7 +65,8 @@
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"themes:assets:install Rozier": "symfony-cmd"
"themes:assets:install Rozier": "symfony-cmd",
"requirements-checker": "script"
},
"post-install-cmd": [
"@auto-scripts"
Expand All @@ -83,6 +84,11 @@
"conflict": {
"symfony/symfony": "*"
},
"suggest": {
"roadiz/two-factor-bundle": "Provides a two-factor authentication system for Roadiz CMS",
"roadiz/user-bundle": "Public user management bundle for Roadiz CMS",
"roadiz/font-bundle": "Manage and expose web fonts with Roadiz CMS"
},
"extra": {
"symfony": {
"allow-contrib": false,
Expand Down
4 changes: 4 additions & 0 deletions config/api_resources/attribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
RZ\Roadiz\CoreBundle\Entity\Attribute:
operations: []

29 changes: 14 additions & 15 deletions config/api_resources/attribute_value.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#---
#RZ\Roadiz\CoreBundle\Entity\AttributeValue:
# collectionOperations:
# get:
# method: "GET"
# normalization_context:
# groups: ["urls", "attribute", "document_display"]
# enable_max_depth: true
# itemOperations:
# get:
# method: 'GET'
# normalization_context:
# groups: ["urls", "attribute", "document_display"]
# enable_max_depth: true
#
---
RZ\Roadiz\CoreBundle\Entity\AttributeValue:
operations:
ApiPlatform\Metadata\GetCollection:
method: "GET"
normalizationContext:
groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"]
enable_max_depth: true
ApiPlatform\Metadata\Get:
method: 'GET'
normalizationContext:
groups: ["urls", "attribute", "document_display", "attribute_node", "attribute_documents"]
enable_max_depth: true

11 changes: 7 additions & 4 deletions config/api_resources/common_content.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
App\Api\Model\CommonContent:
collectionOperations: {}
itemOperations:
operations:
getCommonContent:
class: ApiPlatform\Metadata\Get
method: 'GET'
path: '/common_content'
uriTemplate: '/common_content'
read: false
controller: App\Controller\GetCommonContentController
pagination_enabled: false
normalization_context:
normalizationContext:
enable_max_depth: true
pagination_enabled: false
groups:
Expand All @@ -17,9 +17,12 @@ App\Api\Model\CommonContent:
- walker
- walker_level
- children
- children_count
- nodes_sources_base
- nodes_sources_default
- urls
#- blocks_urls
- tag_base
- translation_base
- document_display
- document_folders
Loading

0 comments on commit e309974

Please sign in to comment.