This guide contains instructions to upgrade from version v7.1.0 to v7.2.0.
Before you start, don't forget to take a look at general instructions about upgrading. There you can find links to upgrade notes for other versions too.
- update the definition of the postgres service in your
docker-compose.yml
file to use the customized configuration (#946)postgres: image: postgres:10.5-alpine container_name: shopsys-framework-postgres volumes: - ./docker/postgres/postgres.conf:/var/lib/postgresql/data/postgresql.conf:delegated - ./var/postgres-data:/var/lib/postgresql/data:cached environment: - PGDATA=/var/lib/postgresql/data/pgdata - POSTGRES_USER=root - POSTGRES_PASSWORD=root - POSTGRES_DB=shopsys + command: + - postgres + - -c + - config_file=/var/lib/postgresql/data/postgresql.conf
- similarly, update postgres deployment manifest in your
kubernetes/deployments/postgres.yml
- name: PGDATA value: /var/lib/postgresql/data/pgdata + args: + - postgres + - -c + - config_file=/var/lib/postgresql/data/postgresql.conf
- similarly, update postgres deployment manifest in your
- update your nginx.conf file like this to have in nginx the same limit for file size as for php from php.ini (#947)
server { listen 8080; access_log /var/log/nginx/shopsys-framework.access.log; root /var/www/html/web; server_tokens off; + client_max_body_size 32M;
- also, update your ingress.yml config file
metadata: name: shopsys + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: 32m spec: rules:
- check and update also all parent proxy servers for each project
- also, update your ingress.yml config file
- remove node ports from kubernetes services and add them into the ingress router for the CI overlay (#888)
- remove
NodePort
type fromkubernetes/services/adminer.yml
,kubernetes/services/elasticsearch.yml
andkubernetes/services/redis-admin.yml
- type: NodePort ports: - name: http
- add ingress kustomize patch for CI deployment into
kubernetes/kustomize/overlays/ci/kustomization.yaml
- ../../../services/selenium-server.yml +patchesJson6902: +- target: + group: extensions + version: v1beta1 + kind: Ingress + name: shopsys + path: ./ingress-patch.yaml configMapGenerator:
- create
kubernetes/kustomize/overlays/ci/ingress-patch.yaml
and add the routes for adminer, elasticsearch and redis-admin+- op: add + path: /spec/rules/- + value: + host: ~ + http: + paths: + - path: / + backend: + serviceName: adminer + servicePort: 80 +- op: add + path: /spec/rules/- + value: + host: ~ + http: + paths: + - path: / + backend: + serviceName: elasticsearch + servicePort: 9200 +- op: add + path: /spec/rules/- + value: + host: ~ + http: + paths: + - path: / + backend: + serviceName: redis-admin + servicePort: 80
- remove
- add
TransformString::removeDriveLetterFromPath
transformer for all absolute paths that could be based with drive letter file systems and used bylocal_filesystem
service (#942)- add TransformString::removeDriveLetterFromPath into
src/Shopsys/ShopBundle/DataFixtures/Demo/ImageDataFixture.php
protected function moveFilesFromLocalFilesystemToFilesystem(string $origin, string $target) { $finder = new Finder(); $finder->files()->in($origin); foreach ($finder as $file) { - $filepath = $file->getPathname(); + $filepath = TransformString::removeDriveLetterFromPath($file->getPathname());
- add TransformString::removeDriveLetterFromPath into
- if you extended one of these form fields listed below, you need to change the group from
basicInformation
toprices
(#956)- in
PaymentFormType
fieldsvat
andczkRounding
- in
TransportFormType
fieldvat
- in
- change all occurrences of
->will($this->returnValue(…))
into->willReturn(…)
in all yourTestCase
tests (#939)- example:
- $emMock->expects($this->once())->method('find')->will($this->returnValue($expectedObject)); + $emMock->expects($this->once())->method('find')->willReturn($expectedObject);
- example:
- remove unused
@dataProvider
annotation fromTests\ShopBundle\Functional\Twig\PriceExtensionTest:checkPriceFilter
method (#939)/** - * @dataProvider priceFilterDataProvider * @param mixed $input
- reconfigure
fm_elfinder
to usemain_filesystem
(#932)- upgrade the version of
helios-ag/fm-elfinder-bundle
composer dependency to^9.2
- you can do this by
composer require helios-ag/fm-elfinder-bundle:^9.2 --update-with-dependencies
- you can do this by
- remove the package
barryvdh/elfinder-flysystem-driver
from your direct composer dependecies (shopsys/framework
includes the driver implementation)- you can do this by
composer remove barryvdh/elfinder-flysystem-driver
- you can do this by
- update
fm_elfinder.yml
configdriver: Flysystem - path: '%shopsys.filemanager_upload_web_dir%' + path: 'web/%shopsys.filemanager_upload_web_dir%' flysystem: - type: local - options: - local: - path: '%shopsys.web_dir%' + enabled: true + filesystem: 'main_filesystem' upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - tmb_path: '%shopsys.filemanager_upload_web_dir%/_thumbnails' + tmb_path: 'web/%shopsys.filemanager_upload_web_dir%/_thumbnails' url: '%shopsys.filemanager_upload_web_dir%' tmb_url: '%shopsys.filemanager_upload_web_dir%/_thumbnails' attributes: thumbnails: - pattern: '/^\/content\/wysiwyg\/_thumbnails$/' + pattern: '/^\/web\/content\/wysiwyg\/_thumbnails$/' hidden: true
- read the section about proxying the URL content subpaths via webserver domain in the
Abstract Filesystem documentation
- upgrade the version of
- to be more descriptive about the error caused by active TEST environment, modify
ErrorController::createUnableToResolveDomainResponse()
to be explicit aboutoverwrite_domain_url
parameter (#701)- you can see the diff
- use interchangeable product filtering (#943)
- you'll find detailed instructions in separate article Upgrade Instructions for Interchangeable Filtering
-
use the standard format for redis prefixes (#928)
- change the prefixes in
app/config/packages/snc_redis.yml
andapp/config/packages/test/snc_redis.yml
- please find inspiration in the diff of #928 - once you finish this change, you should still deal with older redis cache keys that don't use new prefixes - such keys are not removed even by
php phing clean-redis-old
, please find and remove them manually (via console or UI)
Be careful, this upgrade will remove current sessions
- change the prefixes in
-
use redis as cache for doctrine and framework (#930)
- update
app/config/packages/framework.yml
:framework: + annotations: + cache: shopsys.framework.cache_driver.annotations_cache
- update
app/config/packages/snc_redis.yml
:snc_redis: clients: ... + framework_annotations: + type: 'phpredis' + alias: 'framework_annotations' + dsn: 'redis://%redis_host%' + options: + prefix: '%env(REDIS_PREFIX)%%build-version%:cache:framework:annotations:'
- update
app/config/packages/doctrine.yml
:metadata_cache_driver: type: service - id: Doctrine\Common\Cache\ChainCache + id: shopsys.doctrine.cache_driver.metadata_cache query_cache_driver: type: service - id: Doctrine\Common\Cache\ChainCache + id: shopsys.doctrine.cache_driver.query_cache
- update
app/config/packages/test/doctrine.yml
:doctrine: ... + orm: + metadata_cache_driver: + type: service + id: Doctrine\Common\Cache\ArrayCache + query_cache_driver: + type: service + id: Doctrine\Common\Cache\ArrayCache
- update
app/config/packages/dev/doctrine.yml
:doctrine: orm: auto_generate_proxy_classes: true - metadata_cache_driver: array - query_cache_driver: array
- update
-
prepare the configuration file for cron services in your project repository (#989)
- create a
cron.yml
file insrc/ShopBundle/Resources/config/services/
(if you created thecron.yml
already, move it there) - insert the following code as a template:
services: _defaults: autowire: true autoconfigure: true public: false # Example: # Shopsys\FrameworkBundle\Model\Product\Search\Export\ProductSearchExportCronModule: # tags: # - { name: shopsys.cron, hours: '*', minutes: '*' }
- update
src/Shopsys/ShopBundle/Resources/config/services.yml
to import the service definitions:imports: - { resource: forms.yml } - - { resource: services/commands.yml } - - { resource: services/data_fixtures.yml } + - { resource: services/*.yml }
- create a
-
move
database_server_version
parameter toparameters_common.yml
(#1001)- remove parameter from
parameters.yml
andparameters.yml.dist
- add the parameter to
parameters_common.yml
:parameters: database_driver: pdo_pgsql + database_server_version: 10.5 ...
- remove parameter from
-
add
env(ELASTIC_SEARCH_INDEX_PREFIX): ''
into yourapp/config/parameters.yml.dist
and alsoapp/config/parameters.yml
(#961)
- add path for tests folder into
ecs-fix
phing target ofbuild-dev.xml
file to be able to fix files that were found byecs
phing target (#980)<arg path="${path.src}" /> + <arg path="${path.tests}" />
- in order to have translations extracted even from overwritten templates, update your
build-dev.xml
file (#931):<target name="dump-translations-project-base" description="Extracts translatable messages from all source files in project base."> <exec executable="${path.php.executable}" passthru="true" checkreturn="true"> <arg value="${path.bin-console}" /> <arg value="translation:extract" /> <arg value="--bundle=ShopsysShopBundle" /> <arg value="--dir=${path.src}/Shopsys/ShopBundle" /> + <arg value="--dir=${path.app}/Resources" /> <arg value="--exclude-dir=frontend/plugins" /> <arg value="--output-format=po" /> <arg value="--output-dir=${path.src}/Shopsys/ShopBundle/Resources/translations" /> <arg value="--keep" /> <arg value="cs" /> <arg value="en" /> </exec> </target>