Skip to content

Commit

Permalink
Updated vendors for 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezary Olejarczyk committed May 24, 2018
1 parent 0ef5cc1 commit 158964f
Show file tree
Hide file tree
Showing 72 changed files with 1,825 additions and 231 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ frontend/yarn-error.log
/docker/docker-compose.local.yml
/docker/dev/php/fpm-dockerfile.local
/docker/local
/backend/app/var/import/*
29 changes: 0 additions & 29 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,6 @@ variables:
POSTGRES_USER: "openloyalty"
POSTGRES_PASSWORD: "openloyalty"

php-7.0:
image: tetraweb/php:7.0
stage: test
services:
- elasticsearch:2.2
- postgres:9
script:
- echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory.ini
- cd backend
- mkdir app/var
- mkdir app/var/jwt
- openssl genrsa -out app/var/jwt/private.pem 4096
- openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem
- docker-php-ext-enable zip pdo pgsql pdo_pgsql mbstring intl bcmath
- "sed -i 's/database_host: .*/database_host: postgres/g' app/config/parameters.yml.dist"
- "sed -i 's/elastica_host: .*/elastica_host: elasticsearch/g' app/config/parameters.yml.dist"
- composer self-update
- composer install
- bin/console oloy:user:projections:index:create --drop-old
- bin/console doctrine:schema:update --env=test -n --force
- bin/console broadway:event-store:schema:drop
- bin/console broadway:event-store:schema:init
- bin/console doctrine:fixtures:load --env=test -n
- bin/console assets:install --env=test
- bin/console security:check
- bin/console doctrine:schema:validate --env=test --skip-sync
- vendor/phpunit/phpunit/phpunit
- bin/php-cs-fixer fix --dry-run --diff src

php-7.1:
image: tetraweb/php:7.1
stage: test
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.5.0] - 25-05-2018
### Added
- added property hasPhoto to indicate a model has photo in campaigns, earning points rules and levels
- added photo to Levels
- added photo to Earning Points Rules
- added uploading transactions from XML file
- added new Reward Campaign "CashBack"
- added a new property "Prize value" to the Reward Campaigns
- added a new property "Tax" to the Reward Campaigns
- added a new settings "Small logo"
- added uploading points transfers from XML file
- added a new sorting filter "manuallyAssignedLevel" to the customer list
- added a method to unassign a customer from assigned manually level /api/customer/{customer}/remove-manually-level
### Changed
- upgraded minimum version of PHP from 7.0 to 7.1
- changed campaignId object to string in response from /api/customer/campaign/bought
- property "pointsEarned" is now always available in the /api/transaction response

## [2.4.0] - 23-04-2018
### Added
- added missing translations
Expand Down
7 changes: 7 additions & 0 deletions UPGRADE-2.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UPGRADE FROM 2.4 to 2.5
=======================

Bumped minimum version of PHP
-----------------------------

* From the 2.5.0 version of Open Loyalty the minimum required version of PHP is 7.1
1 change: 1 addition & 0 deletions backend/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function registerBundles()
new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
new OpenLoyalty\Bundle\CoreBundle\OpenLoyaltyCoreBundle(),
new OpenLoyaltyPlugin\SalesManagoBundle\SalesManagoBundle(),
new OpenLoyalty\Bundle\ImportBundle\OpenLoyaltyImportBundle(),
new OpenLoyalty\Bundle\WorldTextBundle\OpenLoyaltyWorldTextBundle(),
];

Expand Down
82 changes: 74 additions & 8 deletions backend/app/Resources/frontend_translations/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"save": "Save",
"yes": "Yes",
"no": "No",
"unlink": "Unlink",
"program_name": "Open Loyalty",
"admin_footer": "2016 Open Loyalty",
"true": "True",
Expand Down Expand Up @@ -39,7 +40,8 @@
"loading": "loading",
"home": "Home",
"upload": "Upload",
"remove": "Remove"
"remove": "Remove",
"import": "Import"
},
"users": {
"heading": "Users",
Expand Down Expand Up @@ -300,6 +302,7 @@
"no_segments": "Customer not assigned to any segment",
"no_pos": "Customer is not assigned to any POS",
"all_profile_details": "Show all profile details",
"remove_manually_level_title": "Remove level assigned manually",
"campaign": {
"coupon_used": "This coupon has been used",
"not_enough_points": "Not enough points",
Expand Down Expand Up @@ -391,7 +394,9 @@
"add_special_reward": "Add special reward",
"users_in_level": "Customers in level",
"assign_pos": "Assign POS",
"min_order": "Min order value"
"min_order": "Min order value",
"photo": "Level photo",
"assigned_manually": "Assigned manually"
},
"earning_rule": {
"reward": "Reward",
Expand Down Expand Up @@ -425,6 +430,7 @@
"list": "Earning points rules list",
"basic_info": "Basic Informations",
"limit_info": "Usage limit",
"photo": "Earning rule photo",
"limit": {
"active": "Usage limit active",
"active_prompt": "",
Expand Down Expand Up @@ -663,7 +669,10 @@
"select_customer": "Select customer",
"points_to_add": "Points to add/spend",
"points_to_spend": "Points to spend",
"actions": "Actions"
"actions": "Actions",
"import": "Import",
"import_title": "Import points transfers",
"import_xml_field": "XML file"
},
"transaction": {
"customer_loyalty_card_number": "Loyalty card number",
Expand Down Expand Up @@ -706,6 +715,9 @@
"transaction_document_number_prompt": "Find transaction by document number",
"customer_id_prompt": "Put customer unique ID",
"link": "Match with customer",
"import": "Import",
"import_title": "Import transactions",
"import_xml_field": "XML file",
"heading": "Transactions",
"transaction_id": "Transaction id",
"points_earned": "Points earned",
Expand All @@ -721,6 +733,8 @@
"settings": {
"logo": "Logo",
"program_logo": "Program logo",
"small_logo": "Small logo",
"hero_image": "Hero image",
"title": "Settings",
"currency": "Currency",
"heading": "Settings",
Expand Down Expand Up @@ -781,7 +795,11 @@
"account_activation_method": "Account activation method",
"account_activation_method_prompt": "",
"smsApiKey": "Api key",
"smsApiToken": "SmsApi token"
"smsApiToken": "SmsApi token",
"webhooks": "Webhooks",
"enable_webhooks": "Enable webhooks",
"uri_webhooks": "URI",
"uri_webhooks_prompt": "e.g. https://example.com/webhook.php"
},
"segment": {
"add": "Add segment",
Expand Down Expand Up @@ -877,6 +895,9 @@
"add": "Add reward campaign",
"edit": "Edit reward campaign",
"edit_heading": "Edit reward campaign",
"point_value": "Point value",
"point_value_prompt": "Each point will be exchanged for provided value (in current currency)",
"cashback": "Cashback",
"heading": "Reward campaigns",
"add_heading": "Add reward campaign",
"type_info": "Campaign type",
Expand All @@ -889,6 +910,12 @@
"active": "Active",
"inactive": "Inactive",
"cost_in_points": "Cost in points",
"reward_value": "Reward value",
"reward_value_prompt": "Value of reward",
"tax_price_value": "Tax value",
"tax_price_value_prompt": "Value of tax for reward",
"tax": "Tax",
"tax_prompt": "Percentage Value of tax for reward",
"limit": "Limit",
"discount_code": "Discount code",
"value_code": "Value code",
Expand Down Expand Up @@ -1017,10 +1044,24 @@
"heading": "Admin profile"
},
"xhr": {
"import": {
"success": "All items has been imported successfully (Processed {{ processed }})",
"warning": "Items has been imported with some errors (Processed {{ processed }}, Success {{ success }}, Failed {{ failed }})",
"error": "Import process failed",
"no_data": "There are no records to process"
},
"delete_settings_logo": {
"success": "Logo has been deleted",
"error": "Logo has not been deleted"
},
"delete_settings_small_logo": {
"success": "Small logo has been deleted",
"error": "Small logo has not been deleted"
},
"delete_settings_hero_image": {
"success": "Hero image has been deleted",
"error": "Hero image has not been deleted"
},
"post_resend_customer_code": {
"error": "Cannot resend activation code. Make sure that phone number is correct or wait for few minutes and try again.",
"success": "Code was sent to your phone"
Expand All @@ -1029,7 +1070,16 @@
"success": "Code was sent to customer phone"
},
"upload_settings_logo": {
"success": "Logo has been saved"
"success": "Logo has been saved",
"error": "Logo hasn't been saved"
},
"upload_settings_small_logo": {
"success": "Small logo has been saved",
"error": "Small logo hasn't been saved"
},
"upload_settings_hero_image": {
"success": "Hero image has been saved",
"error": "Hero image hasn't been saved"
},
"customer_search": {
"success": "Success",
Expand Down Expand Up @@ -1125,11 +1175,13 @@
},
"put_earning_rule": {
"success": "You successfully edited earning points rule.",
"error": "An error occurred"
"error": "An error occurred",
"warning": "Couldn't uploaded earning points rule's image"
},
"post_earning_rule": {
"success": "Earning points rule added",
"error": "An error occurred"
"error": "An error occurred",
"warning": "Earning rule added without photo"
},
"get_levels_list": {
"error": "Cannot get levels list"
Expand All @@ -1140,10 +1192,16 @@
},
"post_single_level": {
"success": "You successfully added level.",
"error": "An error occurred"
"error": "An error occurred",
"warning": "Level added without photo"
},
"put_single_level": {
"success": "You successfully edited level.",
"error": "An error occurred",
"warning": "Level edited without photo"
},
"delete_level_image": {
"success": "Image deleted",
"error": "An error occurred"
},
"get_segments": {
Expand Down Expand Up @@ -1298,6 +1356,14 @@
},
"get_redeemed_campaigns": {
"error": "An error occurred"
},
"delete_earning_rule_image": {
"success": "Image deleted",
"error": "An error occurred"
},
"post_remove_customer_manually_level": {
"success": "Manually level has been removed",
"error": "An error occurred"
}
},
"front_error": {
Expand Down
4 changes: 4 additions & 0 deletions backend/app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ parameters:

campaign_photos_adapter: campaign_photos_local
campaign_photos_adapter_env: CAMPAIGN_PHOTOS_ADAPTER
level_photos_adapter: level_photos_local
level_photos_adapter_env: LEVEL_PHOTOS_ADAPTER
earning_rule_photos_adapter: earning_rule_photos_local
earning_rule_photos_adapter_env: EARNING_RULE_PHOTOS_ADAPTER
4 changes: 4 additions & 0 deletions backend/app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ security:
- { path: ^/api/customer/self_register, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/customer/activate/*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/campaign/([a-zA-Z\-0-9]+)/photo, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/earningRule/([a-zA-Z\-0-9]+)/photo, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/level/([a-zA-Z\-0-9]+)/photo, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/password/reset, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/customer/password/reset.*, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/customer/customer-phone/send-sms-code, roles: IS_AUTHENTICATED_ANONYMOUSLY }
Expand All @@ -139,6 +141,8 @@ security:
- { path: ^/api/token/refresh, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/settings/choices, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api/settings/logo, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/settings/small-logo, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/settings/hero-image, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/settings/activation-method, roles: IS_AUTHENTICATED_ANONYMOUSLY, methods: ["GET"] }
- { path: ^/api/translations, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
Empty file added backend/app/var/.gitkeep
Empty file.
28 changes: 20 additions & 8 deletions backend/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,26 @@
<exec command="bin/console doctrine:fixtures:load -n -vvv" checkreturn="true" passthru="true"/>
<exec command="bin/console oloy:segment:recreate -vv" checkreturn="true" passthru="true"/>
</target>
<target name="test" description="Setup everything and run tests">
<exec command="bin/console oloy:user:projections:index:create --drop-old -n" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:schema:update --env=test -n --force" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:drop -n" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:init -n" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load --env=test -n" checkreturn="true" passthru="true"/>
<exec command="bin/console oloy:segment:recreate -vv" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit src/OpenLoyalty/Bundle/ActivationCodeBundle/Test/Service/ActivationCodeManagerTest.php" checkreturn="true" passthru="true"/>
<target name="fix-code" description="Fix code">
<exec command="bin/php-cs-fixer fix src" checkreturn="true" passthru="true"/>
</target>
<target name="test" description="Setup everything and run some tests">
<echo>
phing test -Dsrc=src/OpenLoyalty/Bundle/TransactionBundle/Tests/Controller/Api/TransactionControllerTest.php -Dno-build
</echo>
<property name="src" value="" />
<if>
<isset property="no-build" />
<else>
<exec command="bin/console oloy:user:projections:index:create --drop-old -n" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:schema:update --env=test -n --force" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:drop -n" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:init -n" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load --env=test -n" checkreturn="true" passthru="true"/>
<exec command="bin/console oloy:segment:recreate -vv" checkreturn="true" passthru="true"/>
</else>
</if>
<exec command="vendor/phpunit/phpunit/phpunit ${src} --stop-on-error --stop-on-failure -v" checkreturn="true" passthru="true"/>
</target>
<target name="unit" description="Run unit tests">
<exec command="vendor/phpunit/phpunit/phpunit --testsuite Unit" checkreturn="true" passthru="true"/>
Expand Down
2 changes: 1 addition & 1 deletion backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"ramsey/uuid-doctrine": "1.4.3",
"smsapi/php-client": "^1.8",
"misd/phone-number-bundle": "^1.3",
"divante-ltd/open-loyalty-framework": "^2.4"
"divante-ltd/open-loyalty-framework": "^2.5"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.0",
Expand Down
Loading

0 comments on commit 158964f

Please sign in to comment.