There is a list of all the repositories maintained by monorepo, changes in log below are ordered as this list:
- shopsys/framework
- shopsys/project-base
- shopsys/shopsys
- shopsys/coding-standards
- shopsys/form-types-bundle
- shopsys/http-smoke-testing
- shopsys/migrations
- shopsys/monorepo-tools
- shopsys/plugin-interface
- shopsys/product-feed-google
- shopsys/product-feed-heureka
- shopsys/product-feed-heureka-delivery
- shopsys/product-feed-zbozi
- shopsys/microservice-product-search
- shopsys/microservice-product-search-export
- #494 Microservices webserver using nginx + php-fpm
- execute
docker-compose pull
to pull new microservice images anddocker-compose up -d
to start newly pulled microservices - url addresses to microservices have changed, you need to upgrade url address provided in
app/config/parameters.yml
- update parameter
microservice_product_search_url
frommicroservice-product-search:8000
tomicroservice-product-search
- update parameter
microservice_product_search_export_url
, frommicroservice-product-search-export:8000
tomicroservice-product-search-export
- update parameter
- execute
- #502 - fixed acceptance tests (loading DB dump)
- when you upgrade
codeception/codeception
to version2.5.0
, you have to change parameterpopulate
totrue
intests/ShopBundle/Acceptance/acceptance.suite.yml
- when you upgrade
- #468 - Setting for docker on mac are now more optimized
- if you use the Shopsys Framework with docker on the platform Mac, modify your docker-compose.yml and docker-sync.yml according to the new templates
- next restart docker-compose and docker-sync
- #483 - updated info about Docker on Mac
- if you use Docker for Mac and experience issues with
composer install
resulting inKilled
status, try increasing the allowed memory - we recommend to set 2 GB RAM, 1 CPU and 2 GB Swap in
Docker -> Preferences… -> Advanced
- if you use Docker for Mac and experience issues with
- 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 (e.g. from
#product_edit_form_productData
to#product_form
) - 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 - 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, rebuilding images is needed (
docker-compose up -d --build
) - #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
which need to be filled in yourparameters.yml
(executingcomposer install
should be enough)
- check changes in the
- 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
- 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
- configuration files (
config.yml
,config_dev.yml
,config_test.yml
,security.yml
andwysiwyg.yml
) has been split into packages config files (seeapp/config/packages
folder)- update appropriate package configs in case you had some custom configuration set in those files
- 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
- 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 - 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
- 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
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
-
copy new version of
docker-compose.
:cp docker/conf/docker-compose.yml.dist -f docker-compose.yml
Note: select correct
docker-compose
according to your operating system -
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/*
-
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
- added Microservice Product Search
- check changes in the
docker-compose.yml
template you used and replicate them, there is a new containermicroservice-product-search
parameters.yml.dist
contains new parametermicroservice_product_search_url
- 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
- 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
- move creation of data objects into factories
- already existing data object factories changed their signatures
- to change the last item in admin breadcrumb, use
BreadcrumbOverrider:overrideLastItem(string $label)
instead ofBreadcrumb::overrideLastItem(MenuItem $item)
- if you've customized the admin menu by using your own
admin_menu.yml
, implement event listeners instead- see the Adding a New Administration Page cookbook for details
- move creation of data objects into factories
- already existing data object factories changed their signatures
- move creation of data objects into factories
- already existing data object factories changed their signatures
- move creation of data objects into factories
- already existing data object factories changed their signatures
- classes in src/Components were revised, refactored and some of them were moved to model, for upgrading to newer version, you must go through commits done in #272 and reflect the changes of namespaces.
- FriendlyUrlToGenerateRepository: deleted. If you want to define your own data for friendly url generation, do it so by
implementing the FriendlyUrlDataProviderInterface and tag your service with
shopsys.friendly_url_provider
. - check changes in src/Model, all editData.php were merged into its Data.php relatives
- Twig has been updated to version 2.4.8
- access multi-domain attributes of entities via their main entity (instead of the usual entity detail)
- entity domains (eg.
BrandDomain
) should be created, edited and directly accessed only in their main entities (eg.Brand
) - see #165 Different approach to multidomain entities for details
- entity domains (eg.
DomainsType
now uses array of booleans indexed by domain IDs instead of array of domain IDs, original behavior can be restored by adding model data transformerIndexedBooleansToArrayOfIndexesTransformer
CategoryDomain::$hidden
was changed toCategoryDomain::$enabled
along with related methods (with negated value)PaymentDomain
andTransportDomain
are now created even for domains on which the entity should not be visible, check your custom queries that work with payments or transports- instead of using
EntityManagerFacade::clear()
callclear()
directly on theEntityManager
- all *Detail classes were removed:
- use
CategoryWithLazyLoadedVisibleChildren
instead ofLazyLoadedCategoryDetail
- use
CategoryWithLazyLoadedVisibleChildrenFactory::createCategoriesWithLazyLoadedVisibleChildren()
instead ofCategoryDetailFactory::createLazyLoadedDetails()
- use
CategoryFacade::getCategoriesWithLazyLoadedVisibleChildrenForParent()
instead ofCategoryFacade::getVisibleLazyLoadedCategoryDetailsForParent()
- use
CategoryWithPreloadedChildren
instead ofCategoryDetail
- use
CategoryWithPreloadedChildrenFactory::createCategoriesWithPreloadedChildren()
instead ofCategoryDetailFactory::createDetailsHierarchy()
- use
CategoryFacade::getVisibleCategoriesWithPreloadedChildrenForDomain()
instead ofCategoryFacade::getVisibleCategoryDetailsForDomain()
- use
PaymentFacade::getIndependentBasePricesIndexedByCurrencyId()
instead ofPaymentDetail::$basePricesByCurrencyId
- use
TransportFacade::getIndependentBasePricesIndexedByCurrencyId()
instead ofTransportDetail::$basePricesByCurrencyId
ProductDetail::hasContentForDetailBox()
is not available anymore (it was useless)- use
ProductCachedAttributesFacade
for accessing product parameter values and selling price - in templates, use Twig function
getProductParameterValues(product)
instead ofproductDetail.parameters
- in templates, use Twig function
getProductSellingPrice(product)
instead ofproductDetail.sellingPrice
- use
- Twig has been updated to version 2.4.8
- create your custom
easy-coding-standard.yml
in your project root with your ruleset (you can use predefined ruleset as shown below) - in order to run all checks, there is new unified way - execute
php vendor/bin/ecs check /path/to/project
- see EasyCodingStandard docs for more information
#easy-coding-standard.yml
imports:
- { resource: '%vendor_dir%/shopsys/coding-standards/easy-coding-standard.yml' }
parameters:
exclude_files:
- '*/ignored_folder/*'
skip:
ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff:
- '*/src/file.php'
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8
- check changes in the
docker-compose.yml
template you used, there were a couple of important changes you need to replicate- easiest way is to overwrite your
docker-compose.yml
with by the appropriate template
- easiest way is to overwrite your
- on *nix systems, fill your UID and GID (you can run
id -u
andid -g
to obtain them) into Docker build argumentswww_data_uid
andwww_data_gid
and rebuild your image viadocker-compose up --build
- change owner of the files in shared volume to
www-data
from the container by runningdocker exec -u root shopsys-framework-php-fpm chown -R www-data /var/www/html
- the user has shared UID, so you will be able to access it as well from the host machine
- shared volume with postgres data should be owned by
postgres
user:docker exec -u root shopsys-framework-php-fpm chown -R postgres /var/www/html/var/postgres-data
- if you were using a mounted volume to share Composer cache with the container, change the target directory from
/root/.composer
to/home/www-data/.composer
- in such case, you should change the owner as well by running
docker exec -u root shopsys-framework-php-fpm chown -R www-data /home/www-data/.composer
- in such case, you should change the owner as well by running
Before we managed to implement monorepo for our packages, we had slightly different versions for each of our package, that's why is this section formatted differently.
- requires possibility of extending the CRUD of categories via
shopsys.crud_extension
of typecategory
- requires update of shopsys/plugin-interface to version
^0.3.0
and shopsys/product-feed-interface to^0.5.0
- implement method
getMainCategoryId()
in your implementations ofStandardFeedItemInterface
.
- implement method
isSellingDenied()
for all implementations ofStandardFeedItemInterface
. - you have to take care of filtering of non-sellable items in implementations of
FeedConfigInterface::processItems()
in your product feed plugin because the instances ofStandardFeedItemInterface
passed as an argument can be non-sellable now. - implement method
getAdditionalInformation()
in your implementations ofFeedConfigInterface
. - implement method
getCurrencyCode()
in your implementations ofStandardFeedItemInterface
.
- remove method
getFeedItemRepository()
from all implementations and usages ofFeedConfigInterface
.
- Rename all implementations and usages of
FeedItemInterface::getItemId()
togetId()
. - Rename all implementations and usages of
FeedItemCustomValuesProviderInterface
toHeurekaCategoryNameProviderInterface
. - If you are using custom values in your implementation, you need to implement interfaces from package shopsys/plugin-interface (see how to work with data storage interface).
- all implementations of
DataStorageInterface
now must have implemented methodgetAll()
for getting all saved data indexed by keys
- manual upgrade from this version will be very hard because of BC-breaking extraction of shopsys/framework
- at this moment the core is not easily extensible by your individual functionality
- before upgrading to the new architecture you should upgrade to Dockerized architecture of
2.0.0-beta.21.0
- the upgrade will require overriding or extending of all classes now located in
shopsys/framework that you customized in your forked repository - it would be wise to wait with the upgrade until the newly build architecture has matured
- update custom tests to be compatible with phpunit 7. For further details visit phpunit release announcements phpunit 6 and phpunit 7
- do not longer use Phing targets standards-ci and standards-ci-diff, use standards and standards-diff instead
- use
SimpleCronModuleInterface
andIteratedCronModuleInterface
from their new namespaceShopsys\Plugin\Cron
(instead ofShopsys\FrameworkBundle\Component\Cron
)
- coding standards for JS files were added, make sure
phing eslint-check
passes
(you can runphing eslint-fix
to fix some violations automatically)
- all implementations of
Shopsys\ProductFeed\FeedItemRepositoryInterface
must implement interfaceShopsys\FrameworkBundle\Model\Feed\FeedItemRepositoryInterface
instead- the interface was moved from shopsys/product-feed-interface to core
- parameter
email_for_error_reporting
was renamed toerror_reporting_email_to
inapp/config/parameter.yml.dist
,
you will be prompted to fill it out again duringcomposer install
- all implementations of
StandardFeedItemInterface
must implement methodsisSellingDenied()
andgetCurrencyCode()
, see product-feed-interface
- In order to run all checks, there is new unified way - execute
php vendor/bin/ecs check /path/to/project --config=vendor/shopsys/coding-standards/easy-coding-standard.neon
- If you are overriding rules configuration in your project, it is necessary to do so in neon configuration file, see example bellow.
- See EasyCodingStandard docs for more information
// custom phpcs-fixer.php_cs
<?php
$originalConfig = include __DIR__ . '/../vendor/shopsys/coding-standards/build/phpcs-fixer.php_cs';
$originalConfig->getFinder()
->exclude('_generated');
return $originalConfig;
#custom-coding-standard.neon
includes:
- vendor/symplify/easy-coding-standard/config/psr2-checkers.neon
- vendor/shopsys/coding-standards/shopsys-coding-standard.neon
parameters:
exclude_files:
- *_generated/*