This guide contains instructions to upgrade from version v7.0.0-alpha4 to v7.0.0-alpha5.
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.
Note: instructions marked as "low priority" are not vital, however, we recommend to perform them as well during upgrading as it might ease your work in the future.
- for product search via Elasticsearch, you'll have to:
- check changes in the
docker-compose.yml
template you used and replicate them, there is a new container with Elasticsearch- since
docker-compose.yml
is not versioned, apply changes also in yourdocker-compose.yml.dist
templates so it is easier to upgrade for your team members or for server upgrade
- since
- since the fully installed and ready Microservice Product Search is a necessary condition for the Shopsys Framework to run, the installation procedure of this microservice is a part of Shopsys Framework installation guide
- alternately you can use docker microservice image that require no installation
- run
docker-compose up -d
- update composer dependencies
composer update
- create Elasticsearch indexes by running
php phing elasticsearch-indexes-create
- export products into Elasticsearch by
php phing elasticsearch-products-export
- check changes in the
ProductFormType
is extensible now #375. If you extended the product form, you have to:- move form parts into right subsections, eg. this change on demoshop
- if you don't have custom rendering, remove your template for form
- if you have custom rendering, change rendering of these parts as they are now in subsections
- as the form changed structure, you have to also fix tests. see this change on demoshop
- form fields changed names and also ids
We decided to move onto a newer version of PostgreSQL.
These steps are for migrating your data onto newer version of postgres and are inspired by official documentation:
If you are running your project natively then just follow official instructions, if you are using docker infrastructure you can follow steps written below.
-
create a backup of your database by executing::
docker exec -it shopsys-framework-postgres pg_dumpall > backupfile
-
apply changes in
docker-compose.yml
, you can find them in a new version ofdocker-compose.yml.dist
templatesNote: select correct
docker-compose
according to your operating systemsince
docker-compose.yml
is not versioned, apply changes also in yourdocker-compose.yml.dist
templates so it is easier to upgrade for your team members or for server upgrade -
update version of
database_server_version
from 9.5 to 10.5 in yourparameters.yml
-
stop containers and delete old data:
docker-compose down
rm -rf <project-root-path>/var/postgres-data/*
-
use a new version of
php-fpm
container:curl -L https://github.com/shopsys/shopsys/raw/v7.0.0-alpha5/project-base/docker/php-fpm/Dockerfile --output docker/php-fpm/Dockerfile
docker-compose build php-fpm
-
start new docker-compose stack with newer version of postgres by just recreating your containers:
docker-compose up -d --force-recreate
-
copy backup into postgres container root folder
docker cp backupfile shopsys-framework-postgres:/
-
restore you data:
docker exec -it shopsys-framework-postgres psql -d postgres -f backupfile
-
delete backup file:
docker exec -it shopsys-framework-postgres rm backupfile
-
recreate collations:
docker exec shopsys-framework-php-fpm ./phing db-create test-db-create
- added Microservice Product Search
- check changes in the
docker-compose.yml
template you used and replicate them, there is a new containermicroservice-product-search
- since
docker-compose.yml
is not versioned, apply changes also in yourdocker-compose.yml.dist
templates so it is easier to upgrade for your team members or for server upgrade - follow installation guide to install microservice or use docker microservice image that require no installation
- since
- into
parameters.yml.dist
add a new parametermicroservice_product_search_url
:microservice_product_search_url: 'http://microservice-product-search:8000'
- and add it also into
parameters.yml
- modify a configuration in
services.yml
for:Shopsys\FrameworkBundle\Model\Product\Search\ProductSearchRepository
shopsys.microservice_client.product_search
- remove a configuration in
services.yml
for:Shopsys\FrameworkBundle\Model\Product\Search\ElasticsearchSearchClient
Shopsys\FrameworkBundle\Model\Product\Search\CachedSearchClient
Shopsys\FrameworkBundle\Model\Product\Search\SearchClient
- check changes in the
- (low priority) standardize indentation in your yaml files
- you can find yaml files with wrong indentation with regexp
^( {4})* {1,3}[^ ]
- you can find yaml files with wrong indentation with regexp
- (low priority) we added a new phing target that checks availabitliy of microservices. Feel free to include this target into your build process.
- add new themes to configuration
app/config/config.yml
, pathtwig.form_themes
:- '@ShopsysFramework/Admin/Form/warningMessage.html.twig' - '@ShopsysFramework/Admin/Form/displayOnlyUrl.html.twig' - '@ShopsysFramework/Admin/Form/localizedFullWidth.html.twig' - '@ShopsysFramework/Admin/Form/productParameterValue.html.twig' - '@ShopsysFramework/Admin/Form/productCalculatedPrices.html.twig'