This guide contains instructions to upgrade from version v7.0.0-alpha5 to v7.0.0-alpha6.
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.
- check for usages of
TransportEditFormType
- it was removed and all it's attributes were moved toTransportFormType
so use this form instead - check for usages of
PaymentEditFormType
- it was removed and all it's attributes were moved toPaymentFormType
so use this form instead - check for usages of
ProductEditFormType
- it was removed and all it's attributes were moved toProductFormType
so use this form instead - pay attention to javascripts bound to your forms as well as the elements' names and ids has changed #428
- e.g. change id from
#product_edit_form_productData
to#product_form
- check also your tests, you need to change names and ids of elements too
- e.g. change id from
- PHP-FPM and microservice containers now expect a GitHub OAuth token set via a build argument, so it is not necessary to provide it every time those containers are rebuilt
- see the
github_oauth_token
argument setting in thedocker-compose.yml
template you used and replicate it in yourdocker-compose.yml
- 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
- replace the
place-your-token-here
string by the token generated on Github -> Settings -> Developer Settings -> Personal access tokens
- see the
- as there were changes in the Dockerfiles, replace
php-fpm
dockerfile by a new version:- copy
docker/php-fpm/Dockerfile
from github - rebuild images
docker-compose up -d --build
- if you are in monorepo with microservices, just run
docker-compose up -d --build
- copy
- #438 - Attribute telephone moved from a billing address to the personal data of a user
- this change can affect your extended forms and entities, reflect this change into your project
- Microservice Product Search Export was added and it needs to be installed and run
- check changes in the
docker-compose.yml
template you used and replicate them, there is a new containermicroservice-product-search-export
parameters.yml.dist
contains new parametermicroservice_product_search_export_url
- add
microservice_product_search_export_url: 'http://microservice-product-search-export:8000'
into yourparameters.yml.dist
- execute
composer install
(it will copy parameter intoparameters.yml
)
- add
- check changes in the
- (low priority) instead of building the Docker images of the microservices yourself, you can use pre-built images on Docker Hub (see the
docker-compose.yml
template you used) - #438 - Attribute telephone moved from a billing address to the personal data of a user
- edit
ShopBundle/Form/Front/Customer/BillingAddressFormType
- removetelephone
- edit
ShopBundle/Form/Front/Customer/UserFormType
- addtelephone
- edit twig templates and tests in such a way as to reflect the movement of
telephone
attribute according to the pull request
- edit
- (low priority) to use custom postgres configuration check changes in the
docker-compose.yml
templates and replicate them, there is a new volume forpostgres
container- PR Improve Postgres configuration to improve performance
- Stop running containers
docker-compose down
- Move data from
project-base/var/postgres-data
intoproject-base/var/postgres-data/pgdata
. The directory must have correct permission depending on your OS. To provide you with a better image of what exactly needs to be done, there are instructions for Ubuntu:sudo su
cd project-base/var/postgres-data/
- trick to create directory
pgdata
with correct permissionscp -rp base/ pgdata
rm -fr pgdata/*
shopt -s extglob dotglob
mv !(pgdata) pgdata
shopt -u dotglob
exit
- Start containers
docker-compose up -d
- (low priority) configuration files (
config.yml
,config_dev.yml
,config_test.yml
,security.yml
andwysiwyg.yml
) has been split into packages config files, for details see #449- extract each section into own config file
- eg. from
config.yml
extractdoctrine:
section into filepackages/doctrine.yml
- eg. from
config_dev.yml
extractassetic:
section info filepackages/dev/assetic.yml
- and also split
wysiwyg.yml
intopackages/*.yml
- (since
config.yml
will include all files inpackages/
, splittedwysiwyg.yml
will be included automatically)
- (since
- eg. from
- move
security.yml
topackages/security.yml
- the only thing that have to be left in the original configuration files is the import of these new configuration files
- eg.
config_dev.yml
will contain onlyimports: - { resource: packages/dev/*.yml }
- eg.
- extract each section into own config file
- phing targets and console commands for working with elasticsearch were renamed, so rename them in
build.xml
,build-dev.xml
. Also if you call them from other places, rename calling too:- phing targets:
elasticsearch-indexes-create
->microservice-product-search-create-structure
elasticsearch-indexes-delete
->microservice-product-search-delete-structure
elasticsearch-indexes-recreate
->microservice-product-search-recreate-structure
elasticsearch-products-export
->microservice-product-search-export-products
- console commands:
shopsys:elasticsearch:create-indexes
->shopsys:microservice:product-search:create-structure
shopsys:elasticsearch:delete-indexes
->shopsys:microservice:product-search:delete-structure
shopsys:elasticsearch:export-products
->shopsys:microservice:product-search:export-products
- phing targets:
- run
php phing ecs-fix
to apply new coding standards - keep class spacing consistent #384
- when upgrading your installed monorepo, you'll have to change the build context for the images of the microservices in
docker-compose.yml
build.context
should be the root of the microservice (eg.microservices/product-search-export
)build.dockerfile
should bedocker/Dockerfile
- execute
docker-compose up -d --build
, microservices should be up and running