From 14d54a75db39362827b7c0143ec951afdd58248d Mon Sep 17 00:00:00 2001 From: Rajitha Kumara Date: Thu, 19 Nov 2020 15:30:47 +0530 Subject: [PATCH 1/2] OHRM-941:Correct schema entity data types --- symfony/config/doctrine/schema.yml | 50 ++----------- .../config/doctrine/schema.yml | 2 +- .../config/doctrine/schema.yml | 46 ++++++------ .../config/doctrine/schema.yml | 73 +++++++++---------- .../config/doctrine/schema.yml | 2 +- .../config/doctrine/schema.yml | 10 +-- .../config/doctrine/schema.yml | 2 +- .../config/doctrine/schema.yml | 4 +- .../config/doctrine/schema.yml | 4 +- 9 files changed, 77 insertions(+), 116 deletions(-) diff --git a/symfony/config/doctrine/schema.yml b/symfony/config/doctrine/schema.yml index 2fbd33e9e7..46ec1d4ddf 100755 --- a/symfony/config/doctrine/schema.yml +++ b/symfony/config/doctrine/schema.yml @@ -6,7 +6,7 @@ EmpLocations: primary: true location_id as locationId: type: integer - primary: true + primary: true EmpChildren: tableName: hs_hr_emp_children @@ -25,8 +25,8 @@ EmpChildren: Employee: local: emp_number foreign: emp_number - type: one - + type: one + EmpWorkExperience: tableName: hs_hr_emp_work_experience columns: @@ -47,7 +47,7 @@ EmpWorkExperience: local: emp_number foreign: emp_number type: one - + Country: tableName: hs_hr_country columns: @@ -73,7 +73,7 @@ Country: local: cou_code foreign: country type: many - + UniqueId: tableName: hs_hr_unique_id columns: @@ -92,27 +92,7 @@ UniqueId: field_name: type: string(50) notnull: true - -Country: - tableName: hs_hr_country - columns: - cou_code: - type: string(2) - fixed: true - primary: true - name: - type: string(80) - default: '' - notnull: true - cou_name: - type: string(80) - default: '' - notnull: true - iso3: - type: string(3) - fixed: true - numcode: integer(2) - + Province: tableName: hs_hr_province columns: @@ -134,7 +114,7 @@ Province: fixed: true default: us notnull: true - + EmployeeSkill: tableName: hs_hr_emp_skill columns: @@ -200,20 +180,4 @@ Payperiod: local: payperiod_code foreign: payperiod_code type: many - -CurrencyType: - tableName: hs_hr_currency_type - columns: - code: - type: integer(4) - default: '0' - notnull: true - currency_id: - type: string(3) - fixed: true - primary: true - currency_name: - type: string(70) - default: '' - notnull: true diff --git a/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml index 2ca4e83230..788e5e0f64 100644 --- a/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml @@ -281,7 +281,7 @@ PayGradeCurrency: tableName: ohrm_pay_grade_currency columns: pay_grade_id: - type: int + type: integer primary: true currency_id: type: string(6) diff --git a/symfony/plugins/orangehrmBuzzPlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmBuzzPlugin/config/doctrine/schema.yml index 7817eac2e7..a4c71aa8d2 100644 --- a/symfony/plugins/orangehrmBuzzPlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmBuzzPlugin/config/doctrine/schema.yml @@ -3,13 +3,13 @@ Post: columns: id: name: id - type: integer() + type: integer primary: true autoincrement: true employee_number: type: integer(7) text: - type: string() + type: string post_time: type: timestamp notnull: true @@ -29,11 +29,11 @@ Photo: columns: id: name: id - type: integer() + type: integer primary: true autoincrement: true post_id: - type: integer() + type: integer notnull: true photo: type: blob(2147483647) @@ -57,21 +57,21 @@ Link: columns: id: name: id - type: integer() + type: integer primary: true autoincrement: true post_id: - type: integer() + type: integer notnull: true link: - type: string() + type: string notnull: true type: - type: integer() + type: integer title: - type: string() + type: string description: - type: string() + type: string relations: LinkAttached: class: Post @@ -85,11 +85,11 @@ Share: tableName: ohrm_buzz_share columns: id: - type: integer() + type: integer primary: true autoincrement: true post_id: - type: integer() + type: integer notnull: true employee_number: type: integer(7) @@ -103,7 +103,7 @@ Share: type: timestamp notnull: true type: - type: int(1) + type: integer(1) text: type: string(600) updated_at: @@ -128,11 +128,11 @@ Comment: tableName: ohrm_buzz_comment columns: id: - type: integer() + type: integer primary: true autoincrement: true share_id: - type: integer() + type: integer notnull: true employee_number: type: integer(7) @@ -167,12 +167,12 @@ LikeOnComment: tableName: ohrm_buzz_like_on_comment columns: id: - type: integer() + type: integer primary: true autoincrement: true comment_id: name: comment_id - type: integer() + type: integer notnull: true employee_number: name: employee_number @@ -200,11 +200,11 @@ LikeOnShare: tableName: ohrm_buzz_like_on_share columns: id: - type: integer() + type: integer primary: true autoincrement: true share_id: - type: integer() + type: integer notnull: true employee_number: type: integer(7) @@ -231,12 +231,12 @@ UnLikeOnComment: tableName: ohrm_buzz_unlike_on_comment columns: id: - type: integer() + type: integer primary: true autoincrement: true comment_id: name: comment_id - type: integer() + type: integer notnull: true employee_number: name: employee_number @@ -264,11 +264,11 @@ UnLikeOnShare: tableName: ohrm_buzz_unlike_on_share columns: id: - type: integer() + type: integer primary: true autoincrement: true share_id: - type: integer() + type: integer notnull: true employee_number: type: integer(7) diff --git a/symfony/plugins/orangehrmCorePlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmCorePlugin/config/doctrine/schema.yml index 50e431eb21..42aa7726ba 100755 --- a/symfony/plugins/orangehrmCorePlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmCorePlugin/config/doctrine/schema.yml @@ -7,7 +7,7 @@ UniqueId: autoincrement: true last_id: type: integer(4) - unsigned: 1 + unsigned: true notnull: true table_name: name: table_name as dbTable @@ -19,8 +19,7 @@ UniqueId: Config: tableName: hs_hr_config columns: - `key`: - name: `key` as key + key: type: string(100) primary: true value: @@ -55,7 +54,7 @@ WorkflowStateMachine: type: clob notnull: false priority: - type: int + type: integer ReportGroup: tableName: ohrm_report_group @@ -239,7 +238,7 @@ AbstractDisplayField: is_meta: type: boolean notnull: true - default: false + default: false relations: ReportGroup: onDelete: cascade @@ -266,7 +265,7 @@ DisplayField: name: display_field_group_id type: true notnull: true - + CompositeDisplayField: tableName: ohrm_composite_display_field inheritance: @@ -328,7 +327,7 @@ GroupField: group_field_widget: name: group_field_widget as groupFieldWidget type: string(255) - + AvailableGroupField: tableName: ohrm_available_group_field columns: @@ -497,7 +496,7 @@ DisplayFieldGroup: onDelete: cascade local: report_group_id foreign: reportGroupId - + SelectedDisplayFieldGroup: tableName: ohrm_selected_display_field_group columns: @@ -510,19 +509,19 @@ SelectedDisplayFieldGroup: type: integer notnull: true display_field_group_id: - type: int + type: integer unsigned: true notnull: true relations: Report: onDelete: cascade local: report_id - foreign: reportId + foreign: reportId DisplayFieldGroup: onDelete: cascade local: display_field_group_id foreign: id - + SystemUser: tableName: ohrm_user columns: @@ -567,16 +566,14 @@ UserRole: autoincrement: true name: type: string(255) - notnull: true + notnull: true display_name: type: string(255) notnull: true is_assignable: - type: int type: boolean notnull: true is_predefined: - type: int type: boolean notnull: true relations: @@ -585,7 +582,7 @@ UserRole: local: id foreign: user_role_id type: many - + UserSelectionRule: tableName: ohrm_user_selection_rule columns: @@ -605,7 +602,7 @@ UserSelectionRule: rule_xml_data: type: string notnull: true - + UserRoleUserSelectionRule: tableName: ohrm_role_user_selection_rule columns: @@ -619,7 +616,7 @@ UserRoleUserSelectionRule: primary: true configurable_params: type: string - notnull: true + notnull: true Screen: tableName: ohrm_screen columns: @@ -635,7 +632,7 @@ Screen: local: module_id foreign: id type: one - + ScreenPermission: tableName: ohrm_user_role_screen columns: @@ -645,7 +642,7 @@ ScreenPermission: autoincrement: true user_role_id: integer screen_id: integer - can_read: + can_read: type: boolean default: false can_create: @@ -656,17 +653,17 @@ ScreenPermission: default: false can_delete: type: boolean - default: false + default: false relations: UserRole: local: user_role_id foreign: id - type: one + type: one Screen: local: screen_id foreign: id - type: one - + type: one + DataGroup: tableName: ohrm_data_group columns: @@ -692,7 +689,7 @@ DataGroup: refClass: DataGroupScreenPermission local: data_group_id foreign: screen_id - + DataGroupScreenPermission: tableName: ohrm_data_group_screen columns: @@ -702,7 +699,7 @@ DataGroupScreenPermission: primary: true data_group_id: type: integer - screen_id: + screen_id: type: integer permission: integer relations: @@ -744,7 +741,7 @@ DataGroupPermission: UserRole: local: user_role_id foreign: id - type: one + type: one MenuItem: tableName: ohrm_menu_item @@ -764,7 +761,7 @@ MenuItem: Screen: local: screenId foreign: id - type: one + type: one Email: tableName: ohrm_email columns: @@ -790,7 +787,7 @@ Email: local: id foreign: email_id type: many - + EmailTemplate: connection: doctrine tableName: ohrm_email_template @@ -831,7 +828,7 @@ EmailTemplate: notnull: false autoincrement: false body: - type: string() + type: string fixed: false unsigned: false primary: false @@ -841,7 +838,7 @@ EmailTemplate: Email: local: email_id foreign: id - type: one + type: one EmailProcessor: connection: doctrine @@ -871,7 +868,7 @@ EmailProcessor: Email: local: email_id foreign: id - type: one + type: one AdvancedReport: tableName: ohrm_advanced_report @@ -885,8 +882,8 @@ AdvancedReport: notnull: true definition: type: clob - notnull: true - + notnull: true + HomePage: tableName: ohrm_home_page columns: @@ -912,7 +909,7 @@ HomePage: local: user_role_id foreign: id type: one - + ModuleDefaultPage: tableName: ohrm_module_default_page columns: @@ -945,10 +942,10 @@ ModuleDefaultPage: local: module_id foreign: id type: one - + Login: tableName: ohrm_login - columns: + columns: id: type: integer primary: true @@ -956,7 +953,7 @@ Login: user_id: type: integer notnull: true - name: user_id as userId + name: user_id as userId user_name: type: string(255) name: user_name as userName @@ -976,5 +973,5 @@ Login: local: user_id foreign: id type: one - + \ No newline at end of file diff --git a/symfony/plugins/orangehrmCoreWebServicePlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmCoreWebServicePlugin/config/doctrine/schema.yml index c3103c4616..1c4ee61f43 100755 --- a/symfony/plugins/orangehrmCoreWebServicePlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmCoreWebServicePlugin/config/doctrine/schema.yml @@ -7,4 +7,4 @@ WSConsumer: autoincrement: true app_token: string(10) app_name: string(50) - status: int + status: integer diff --git a/symfony/plugins/orangehrmLeavePlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmLeavePlugin/config/doctrine/schema.yml index ef316a09c9..3836b263fd 100644 --- a/symfony/plugins/orangehrmLeavePlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmLeavePlugin/config/doctrine/schema.yml @@ -61,7 +61,7 @@ LeaveEntitlement: notnull: true autoincrement: false days_used: - type: 'decimal(4, 2)' + type: decimal(4, 2) fixed: false primary: false notnull: false @@ -311,14 +311,14 @@ Leave: notnull: false autoincrement: false length_hours: - type: 'decimal(6, 4)' + type: decimal(6, 4) fixed: false unsigned: true primary: false notnull: false autoincrement: false length_days: - type: 'decimal(6, 4)' + type: decimal(6, 4) fixed: false unsigned: true primary: false @@ -415,7 +415,7 @@ LeaveLeaveEntitlement: notnull: false autoincrement: false length_days: - type: 'decimal(6, 4)' + type: decimal(6, 4) fixed: false unsigned: true primary: false @@ -446,7 +446,7 @@ LeaveEntitlementAdjustment: notnull: false autoincrement: false length_days: - type: 'decimal(4, 2)' + type: decimal(4, 2) fixed: false unsigned: true primary: false diff --git a/symfony/plugins/orangehrmPerformancePlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmPerformancePlugin/config/doctrine/schema.yml index c356d1bce2..d7d5590c0d 100644 --- a/symfony/plugins/orangehrmPerformancePlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmPerformancePlugin/config/doctrine/schema.yml @@ -10,7 +10,7 @@ Kpi: name: job_title_code as jobTitleCode type: string(10) kpi_indicators: - type: varchar(255) + type: string(255) min_rating: type: integer(11) max_rating: diff --git a/symfony/plugins/orangehrmPimPlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmPimPlugin/config/doctrine/schema.yml index 7c12be2d4c..01930d3ed8 100755 --- a/symfony/plugins/orangehrmPimPlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmPimPlugin/config/doctrine/schema.yml @@ -200,7 +200,7 @@ Employee: local: empNumber foreign: empNumber type: many - EmployeeTerminationRecord: + EmployeeTerminationRecord as EmployeeTerminationRecord: local: termination_id foreign: id type: one @@ -596,7 +596,7 @@ EmployeeTerminationRecord: local: empNumber foreign: empNumber type: one - Employee: + Employee as Employee: local: id foreign: termination_id type: one diff --git a/symfony/plugins/orangehrmRESTPlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmRESTPlugin/config/doctrine/schema.yml index 9cf55f4276..99bfdd8201 100644 --- a/symfony/plugins/orangehrmRESTPlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmRESTPlugin/config/doctrine/schema.yml @@ -3,7 +3,7 @@ RestApiUsage: columns: id: name: id - type: integer() + type: integer primary: true autoincrement: true client_id: @@ -30,6 +30,6 @@ RestApiUsage: type: string(255) parameters: name: parameters - type: string() + type: string created_at: type: timestamp From 6d79d241f33db747a13a5634d21351c0ecee6a0a Mon Sep 17 00:00:00 2001 From: Rajitha Kumara Date: Fri, 20 Nov 2020 13:04:22 +0530 Subject: [PATCH 2/2] OHRM-941:Integrate Doctrine 2.6 for i18n related entities --- symfony/lib/composer.json | 6 +- symfony/lib/composer.lock | 1393 ++++++++++++++--- symfony/lib/model/Doctrine2.php | 64 + .../orangehrmAdminPlugin/I18NGroup.class.php | 16 - .../I18NGroupTable.class.php | 19 - .../I18NLangString.class.php | 16 - .../I18NLangStringTable.class.php | 19 - .../I18NLanguage.class.php | 16 - .../I18NLanguageTable.class.php | 19 - .../orangehrmAdminPlugin/I18NSource.class.php | 16 - .../I18NSourceTable.class.php | 19 - .../I18NTranslate.class.php | 16 - .../I18NTranslateTable.class.php | 19 - symfony/lib/model/doctrine2/I18NGroup.php | 85 + .../lib/model/doctrine2/I18NLangString.php | 238 +++ symfony/lib/model/doctrine2/I18NLanguage.php | 154 ++ symfony/lib/model/doctrine2/I18NSource.php | 85 + symfony/lib/model/doctrine2/I18NTranslate.php | 238 +++ .../config/doctrine/schema.yml | 89 -- .../orangehrmAdminPlugin/lib/dao/I18NDao.php | 141 +- .../model/doctrine/PluginI18NGroup.class.php | 17 - .../doctrine/PluginI18NGroupTable.class.php | 19 - .../doctrine/PluginI18NLangString.class.php | 17 - .../PluginI18NLangStringTable.class.php | 19 - .../doctrine/PluginI18NLanguage.class.php | 17 - .../PluginI18NLanguageTable.class.php | 19 - .../model/doctrine/PluginI18NSource.class.php | 17 - .../doctrine/PluginI18NSourceTable.class.php | 19 - .../doctrine/PluginI18NTranslate.class.php | 17 - .../PluginI18NTranslateTable.class.php | 19 - .../lib/service/I18NService.php | 23 +- 31 files changed, 2133 insertions(+), 738 deletions(-) create mode 100644 symfony/lib/model/Doctrine2.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NGroup.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NGroupTable.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NLangString.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NLangStringTable.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NLanguage.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NLanguageTable.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NSource.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NSourceTable.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NTranslate.class.php delete mode 100644 symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NTranslateTable.class.php create mode 100644 symfony/lib/model/doctrine2/I18NGroup.php create mode 100644 symfony/lib/model/doctrine2/I18NLangString.php create mode 100644 symfony/lib/model/doctrine2/I18NLanguage.php create mode 100644 symfony/lib/model/doctrine2/I18NSource.php create mode 100644 symfony/lib/model/doctrine2/I18NTranslate.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroup.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroupTable.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLangString.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLangStringTable.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLanguage.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLanguageTable.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NSource.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NSourceTable.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NTranslate.class.php delete mode 100644 symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NTranslateTable.class.php diff --git a/symfony/lib/composer.json b/symfony/lib/composer.json index a7ccea0358..cf50814d9b 100644 --- a/symfony/lib/composer.json +++ b/symfony/lib/composer.json @@ -31,7 +31,8 @@ "psr/log": "^1.0", "google/apiclient": "^2.0", "bjeavons/zxcvbn-php": "^0.3", - "bshaffer/oauth2-server-php": "^1.11" + "bshaffer/oauth2-server-php": "^1.11", + "doctrine/orm": "2.6" }, "require-dev": { "codeception/codeception": "^2.2", @@ -45,7 +46,8 @@ }, "autoload": { "psr-4": { - "Orangehrm\\Rest\\":"../plugins/orangehrmRESTPlugin/lib" + "Orangehrm\\Rest\\":"../plugins/orangehrmRESTPlugin/lib", + "":"model/doctrine2" } } } diff --git a/symfony/lib/composer.lock b/symfony/lib/composer.lock index 58a7441c6c..445ba2caf2 100644 --- a/symfony/lib/composer.lock +++ b/symfony/lib/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "30d886f9a3804eccba4fbfcd34b8eb69", + "content-hash": "6bf5262e5f6c8e00639097daf5a68842", "packages": [ { "name": "bjeavons/zxcvbn-php", @@ -229,6 +229,1017 @@ ], "time": "2018-08-27T06:10:37+00:00" }, + { + "name": "doctrine/annotations", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2020-10-26T10:28:16+00:00" + }, + { + "name": "doctrine/cache", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "13e3381b25847283a91948d04640543941309727" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", + "reference": "13e3381b25847283a91948d04640543941309727", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^6.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2020-07-07T18:54:01+00:00" + }, + { + "name": "doctrine/collections", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/55f8b799269a1a472457bd1a41b4f379d4cfba4a", + "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a", + "shasum": "" + }, + "require": { + "php": "^7.1.3 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan-shim": "^0.9.2", + "phpunit/phpunit": "^7.0", + "vimeo/psalm": "^3.8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "time": "2020-07-27T17:53:49+00:00" + }, + { + "name": "doctrine/common", + "version": "2.13.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/f3812c026e557892c34ef37f6ab808a6b567da7f", + "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/inflector": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.3.3", + "doctrine/reflection": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^1.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpunit/phpunit": "^7.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", + "type": "tidelift" + } + ], + "time": "2020-06-05T16:46:05+00:00" + }, + { + "name": "doctrine/dbal", + "version": "2.10.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "47433196b6390d14409a33885ee42b6208160643" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/47433196b6390d14409a33885ee42b6208160643", + "reference": "47433196b6390d14409a33885ee42b6208160643", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^8.1", + "jetbrains/phpstorm-stubs": "^2019.1", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12.40", + "phpunit/phpunit": "^8.5.5", + "psalm/plugin-phpunit": "^0.10.0", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.14.2" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.10.x-dev", + "dev-develop": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-09-12T21:20:41+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, + { + "name": "doctrine/inflector", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4650c8b30c753a76bf44fb2ed00117d6f367490c", + "reference": "4650c8b30c753a76bf44fb2ed00117d6f367490c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-29T07:19:59+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "a2c590166b2133a4633738648b6b064edae0814a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-03-17T17:37:11+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "doctrine/orm", + "version": "v2.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/orm.git", + "reference": "374e7ace49d864dad8cddbc55346447c8a6a2083" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/orm/zipball/374e7ace49d864dad8cddbc55346447c8a6a2083", + "reference": "374e7ace49d864dad8cddbc55346447c8a6a2083", + "shasum": "" + }, + "require": { + "doctrine/annotations": "~1.5", + "doctrine/cache": "~1.6", + "doctrine/collections": "^1.4", + "doctrine/common": "^2.7.1", + "doctrine/dbal": "^2.6", + "doctrine/instantiator": "~1.1", + "ext-pdo": "*", + "php": "^7.1", + "symfony/console": "~3.0|~4.0" + }, + "require-dev": { + "doctrine/coding-standard": "^1.0", + "phpunit/phpunit": "^6.5", + "squizlabs/php_codesniffer": "^3.2", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\ORM\\": "lib/Doctrine/ORM" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ], + "time": "2017-12-20T00:38:15+00:00" + }, + { + "name": "doctrine/persistence", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/7a6eac9fb6f61bba91328f15aa7547f4806ca288", + "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.2", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.10@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "vimeo/psalm": "^3.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common", + "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", + "type": "tidelift" + } + ], + "time": "2020-06-20T12:56:16+00:00" + }, + { + "name": "doctrine/reflection", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/reflection.git", + "reference": "fa587178be682efe90d005e3a322590d6ebb59a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/reflection/zipball/fa587178be682efe90d005e3a322590d6ebb59a5", + "reference": "fa587178be682efe90d005e3a322590d6ebb59a5", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0 || ^8.2.0", + "doctrine/common": "^2.10", + "phpstan/phpstan": "^0.11.0 || ^0.12.20", + "phpstan/phpstan-phpunit": "^0.11.0 || ^0.12.16", + "phpunit/phpunit": "^7.5 || ^9.1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional functionality on top of the reflection functionality that comes with PHP. It allows you to get the reflection information about classes, methods and properties statically.", + "homepage": "https://www.doctrine-project.org/projects/reflection.html", + "keywords": [ + "reflection", + "static" + ], + "abandoned": "roave/better-reflection", + "time": "2020-10-27T21:46:55+00:00" + }, { "name": "firebase/php-jwt", "version": "v5.0.0", @@ -1226,31 +2237,170 @@ "version": "v5.4.12", "source": { "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "181b89f18a90f8925ef805f950d47a7190e9b950" + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "181b89f18a90f8925ef805f950d47a7190e9b950" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/181b89f18a90f8925ef805f950d47a7190e9b950", + "reference": "181b89f18a90f8925ef805f950d47a7190e9b950", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2018-07-31T09:26:32+00:00" + }, + { + "name": "symfony/console", + "version": "v4.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/e2840bb38bddad7a0feaf85931e38fdcffdb2f81", + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2019-04-08T14:23:48+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "d3636025e8253c6144358ec0a62773cae588395b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/181b89f18a90f8925ef805f950d47a7190e9b950", - "reference": "181b89f18a90f8925ef805f950d47a7190e9b950", + "url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b", + "reference": "d3636025e8253c6144358ec0a62773cae588395b", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1.3" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.2" + "psr/cache": "^1.0", + "psr/container": "^1.0", + "symfony/polyfill-intl-idn": "^1.10" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "1.1-dev" } }, "autoload": { - "files": [ - "lib/swift_required.php" + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1259,21 +2409,25 @@ ], "authors": [ { - "name": "Chris Corbyn" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", "keywords": [ - "email", - "mail", - "mailer" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], - "time": "2018-07-31T09:26:32+00:00" + "time": "2019-04-27T14:29:50+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1563,62 +2717,6 @@ "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", "time": "2019-03-02T15:35:10+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2019-03-17T17:37:11+00:00" - }, { "name": "facebook/webdriver", "version": "1.6.0", @@ -2903,149 +4001,6 @@ "homepage": "https://symfony.com", "time": "2019-04-07T09:56:43+00:00" }, - { - "name": "symfony/console", - "version": "v4.2.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e2840bb38bddad7a0feaf85931e38fdcffdb2f81", - "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/contracts": "^1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2019-04-08T14:23:48+00:00" - }, - { - "name": "symfony/contracts", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/contracts.git", - "reference": "d3636025e8253c6144358ec0a62773cae588395b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b", - "reference": "d3636025e8253c6144358ec0a62773cae588395b", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "require-dev": { - "psr/cache": "^1.0", - "psr/container": "^1.0", - "symfony/polyfill-intl-idn": "^1.10" - }, - "suggest": { - "psr/cache": "When using the Cache contracts", - "psr/container": "When using the Service contracts", - "symfony/cache-contracts-implementation": "", - "symfony/event-dispatcher-implementation": "", - "symfony/http-client-contracts-implementation": "", - "symfony/service-contracts-implementation": "", - "symfony/translation-contracts-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\": "" - }, - "exclude-from-classmap": [ - "**/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A set of abstractions extracted out of the Symfony components", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2019-04-27T14:29:50+00:00" - }, { "name": "symfony/css-selector", "version": "v4.2.8", diff --git a/symfony/lib/model/Doctrine2.php b/symfony/lib/model/Doctrine2.php new file mode 100644 index 0000000000..5a478b1bf4 --- /dev/null +++ b/symfony/lib/model/Doctrine2.php @@ -0,0 +1,64 @@ +getConf(); + $conn = [ + 'driver' => 'pdo_mysql', + 'url' => "mysql://{$conf->dbuser}:{$conf->dbpass}@{$conf->dbhost}:{$conf->dbport}/{$conf->dbname}", + 'charset' => 'utf8mb4' + ]; + + self::$entityManager = EntityManager::create($conn, $config); + } + + /** + * @return Doctrine2 + */ + public static function getInstance() + { + if (is_null(self::$instance)) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * @return EntityManager + */ + public static function getEntityManager() + { + self::getInstance(); + return self::$entityManager; + } +} diff --git a/symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NGroup.class.php b/symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NGroup.class.php deleted file mode 100644 index 12927e52c8..0000000000 --- a/symfony/lib/model/doctrine/orangehrmAdminPlugin/I18NGroup.class.php +++ /dev/null @@ -1,16 +0,0 @@ -id; + } + + /** + * @param int $id + */ + public function setId(int $id) + { + $this->id = $id; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName(string $name) + { + $this->name = $name; + } + + /** + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * @param string $title + */ + public function setTitle(string $title) + { + $this->title = $title; + } +} diff --git a/symfony/lib/model/doctrine2/I18NLangString.php b/symfony/lib/model/doctrine2/I18NLangString.php new file mode 100644 index 0000000000..d573a9c9f5 --- /dev/null +++ b/symfony/lib/model/doctrine2/I18NLangString.php @@ -0,0 +1,238 @@ +I18NGroup = new \Doctrine\Common\Collections\ArrayCollection(); + $this->I18NSource = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * @return int + */ + public function getId(): int + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId(int $id) + { + $this->id = $id; + } + + /** + * @return int + */ + public function getUnitId(): int + { + return $this->unitId; + } + + /** + * @param int $unitId + */ + public function setUnitId(int $unitId) + { + $this->unitId = $unitId; + } + + /** + * @return int + */ + public function getSourceId(): int + { + return $this->sourceId; + } + + /** + * @param int $sourceId + */ + public function setSourceId(int $sourceId) + { + $this->sourceId = $sourceId; + } + + /** + * @return int + */ + public function getGroupId(): int + { + return $this->groupId; + } + + /** + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->groupId = $groupId; + } + + /** + * @return string + */ + public function getValue(): string + { + return $this->value; + } + + /** + * @param string $value + */ + public function setValue(string $value) + { + $this->value = $value; + } + + /** + * @return string + */ + public function getNote(): string + { + return $this->note; + } + + /** + * @param string $note + */ + public function setNote(string $note) + { + $this->note = $note; + } + + /** + * @return string + */ + public function getVersion(): string + { + return $this->version; + } + + /** + * @param string $version + */ + public function setVersion(string $version) + { + $this->version = $version; + } + + /** + * @return \Doctrine\Common\Collections\Collection + */ + public function getI18NGroup(): \Doctrine\Common\Collections\Collection + { + return $this->I18NGroup; + } + + /** + * @param \Doctrine\Common\Collections\Collection $I18NGroup + */ + public function setI18NGroup(\Doctrine\Common\Collections\Collection $I18NGroup) + { + $this->I18NGroup = $I18NGroup; + } + + /** + * @return \Doctrine\Common\Collections\Collection + */ + public function getI18NSource(): \Doctrine\Common\Collections\Collection + { + return $this->I18NSource; + } + + /** + * @param \Doctrine\Common\Collections\Collection $I18NSource + */ + public function setI18NSource(\Doctrine\Common\Collections\Collection $I18NSource) + { + $this->I18NSource = $I18NSource; + } +} diff --git a/symfony/lib/model/doctrine2/I18NLanguage.php b/symfony/lib/model/doctrine2/I18NLanguage.php new file mode 100644 index 0000000000..bd5d2622bb --- /dev/null +++ b/symfony/lib/model/doctrine2/I18NLanguage.php @@ -0,0 +1,154 @@ +id; + } + + /** + * @param int $id + */ + public function setId(int $id) + { + $this->id = $id; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName(string $name) + { + $this->name = $name; + } + + /** + * @return string + */ + public function getCode(): string + { + return $this->code; + } + + /** + * @param string $code + */ + public function setCode(string $code) + { + $this->code = $code; + } + + /** + * @return bool + */ + public function getEnabled(): bool + { + return $this->enabled; + } + + /** + * @param bool $enabled + */ + public function setEnabled(bool $enabled) + { + $this->enabled = $enabled; + } + + /** + * @return bool + */ + public function getAdded(): bool + { + return $this->added; + } + + /** + * @param bool $added + */ + public function setAdded(bool $added) + { + $this->added = $added; + } + + /** + * @return DateTime + */ + public function getModifiedAt(): DateTime + { + return $this->modifiedAt; + } + + /** + * @param DateTime $modifiedAt + */ + public function setModifiedAt(DateTime $modifiedAt) + { + $this->modifiedAt = $modifiedAt; + } +} diff --git a/symfony/lib/model/doctrine2/I18NSource.php b/symfony/lib/model/doctrine2/I18NSource.php new file mode 100644 index 0000000000..0fcd27f303 --- /dev/null +++ b/symfony/lib/model/doctrine2/I18NSource.php @@ -0,0 +1,85 @@ +id; + } + + /** + * @param int $id + */ + public function setId(int $id) + { + $this->id = $id; + } + + /** + * @return string + */ + public function getSource(): string + { + return $this->source; + } + + /** + * @param string $source + */ + public function setSource(string $source) + { + $this->source = $source; + } + + /** + * @return DateTime + */ + public function getModifiedAt(): DateTime + { + return $this->modifiedAt; + } + + /** + * @param DateTime $modifiedAt + */ + public function setModifiedAt(DateTime $modifiedAt) + { + $this->modifiedAt = $modifiedAt; + } +} diff --git a/symfony/lib/model/doctrine2/I18NTranslate.php b/symfony/lib/model/doctrine2/I18NTranslate.php new file mode 100644 index 0000000000..6418ca3c01 --- /dev/null +++ b/symfony/lib/model/doctrine2/I18NTranslate.php @@ -0,0 +1,238 @@ +I18NLangString = new \Doctrine\Common\Collections\ArrayCollection(); + $this->I18NLanguage = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * @return int + */ + public function getId(): int + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId(int $id) + { + $this->id = $id; + } + + /** + * @return int + */ + public function getLangStringId(): int + { + return $this->langStringId; + } + + /** + * @param int $langStringId + */ + public function setLangStringId(int $langStringId) + { + $this->langStringId = $langStringId; + } + + /** + * @return int + */ + public function getLanguageId(): int + { + return $this->languageId; + } + + /** + * @param int $languageId + */ + public function setLanguageId(int $languageId) + { + $this->languageId = $languageId; + } + + /** + * @return string + */ + public function getValue(): string + { + return $this->value; + } + + /** + * @param string $value + */ + public function setValue(string $value) + { + $this->value = $value; + } + + /** + * @return bool + */ + public function getTranslated(): bool + { + return $this->translated; + } + + /** + * @param bool $translated + */ + public function setTranslated(bool $translated) + { + $this->translated = $translated; + } + + /** + * @return bool + */ + public function getCustomized(): bool + { + return $this->customized; + } + + /** + * @param bool $customized + */ + public function setCustomized(bool $customized) + { + $this->customized = $customized; + } + + /** + * @return DateTime + */ + public function getModifiedAt(): DateTime + { + return $this->modifiedAt; + } + + /** + * @param DateTime $modifiedAt + */ + public function setModifiedAt(DateTime $modifiedAt) + { + $this->modifiedAt = $modifiedAt; + } + + /** + * @return \Doctrine\Common\Collections\Collection + */ + public function getI18NLangString(): \Doctrine\Common\Collections\Collection + { + return $this->I18NLangString; + } + + /** + * @param \Doctrine\Common\Collections\Collection $I18NLangString + */ + public function setI18NLangString(\Doctrine\Common\Collections\Collection $I18NLangString) + { + $this->I18NLangString = $I18NLangString; + } + + /** + * @return \Doctrine\Common\Collections\Collection + */ + public function getI18NLanguage(): \Doctrine\Common\Collections\Collection + { + return $this->I18NLanguage; + } + + /** + * @param \Doctrine\Common\Collections\Collection $I18NLanguage + */ + public function setI18NLanguage(\Doctrine\Common\Collections\Collection $I18NLanguage) + { + $this->I18NLanguage = $I18NLanguage; + } +} diff --git a/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml b/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml index 788e5e0f64..7550d5f19c 100644 --- a/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml +++ b/symfony/plugins/orangehrmAdminPlugin/config/doctrine/schema.yml @@ -499,92 +499,3 @@ EmailConfiguration: type: string(50) smtp_security_type as smtpSecurityType: type: string(50) - -I18NGroup: - tableName: ohrm_i18n_group - columns: - id: - type: integer - primary: true - autoincrement: true - name: string(255) - title: string(255) - -I18NLanguage: - tableName: ohrm_i18n_language - columns: - id: - type: integer - primary: true - autoincrement: true - name: string(255) - code: - type: string(255) - unique: true - enabled: boolean - added: boolean - modified_at as modifiedAt: datetime - -I18NLangString: - tableName: ohrm_i18n_lang_string - columns: - id: - type: integer - primary: true - autoincrement: true - unit_id as unitId: integer - source_id as sourceId: integer - group_id as groupId: integer - value: - type: string - unique: true - note: string - version: string(20) - relations: - I18NGroup: - local: groupId - foreign: id - type: one - I18NSource: - local: sourceId - foreign: id - type: one - -I18NTranslate: - tableName: ohrm_i18n_translate - columns: - id: - type: integer - primary: true - autoincrement: true - lang_string_id as langStringId: integer - language_id as languageId: integer - value: string - translated: boolean - customized: boolean - modified_at as modifiedAt: datetime - indexes: - translateUniqueId: - fields: [lang_string_id, language_id] - type: unique - relations: - I18NLangString: - local: langStringId - foreign: id - type: one - I18NLanguage: - local: languageId - foreign: id - type: one - -I18NSource: - tableName: ohrm_i18n_source - columns: - id: - type: integer - primary: true - autoincrement: true - source: - type: string - unique: true - modified_at as modifiedAt: datetime diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/dao/I18NDao.php b/symfony/plugins/orangehrmAdminPlugin/lib/dao/I18NDao.php index 5c2c5bd662..267ffd59a3 100644 --- a/symfony/plugins/orangehrmAdminPlugin/lib/dao/I18NDao.php +++ b/symfony/plugins/orangehrmAdminPlugin/lib/dao/I18NDao.php @@ -22,21 +22,21 @@ class I18NDao extends BaseDao /** * @param string $langCode * @param bool $onlyCustomized - * @return Doctrine_Collection|I18NTranslate[] + * @return I18NTranslate[] * @throws DaoException */ public function getMessages(string $langCode, bool $onlyCustomized = true) { try { - $q = Doctrine_Query::create() - ->from('I18NTranslate t') - ->leftJoin('t.I18NLangString ls') - ->leftJoin('t.I18NLanguage l') - ->andWhere('l.code = ?', $langCode); + $q = Doctrine2::getEntityManager()->getRepository(I18NTranslate::class)->createQueryBuilder('t'); + $q->leftJoin('t.I18NLangString', 'ls') + ->leftJoin('t.I18NLanguage', 'l') + ->andWhere('l.code = :langCode') + ->setParameter('langCode', $langCode); if ($onlyCustomized) { $q->andWhere('t.customized = ?', true); } - return $q->execute(); + return $q->getQuery()->execute(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -46,13 +46,13 @@ public function getMessages(string $langCode, bool $onlyCustomized = true) /** * @param string $langCode - * @return Doctrine_Record|I18NLanguage + * @return I18NLanguage * @throws DaoException */ public function getLanguageByCode(string $langCode) { try { - return Doctrine::getTable('I18NLanguage')->findOneBy('code', $langCode); + return Doctrine2::getEntityManager()->getRepository(I18NLanguage::class)->findOneBy(['code' => $langCode]); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -62,34 +62,38 @@ public function getLanguageByCode(string $langCode) /** * @param ParameterObject $searchParams - * @return Doctrine_Collection|I18NLanguage[] + * @return I18NLanguage[] * @throws DaoException */ public function searchLanguages(ParameterObject $searchParams) { try { - $q = Doctrine_Query::create()->from('I18NLanguage l'); + $q = Doctrine2::getEntityManager()->getRepository(I18NLanguage::class)->createQueryBuilder('l'); if (!empty($searchParams->getParameter('langCode'))) { - $q->andWhere('l.code = ?', $searchParams->getParameter('langCode')); + $q->andWhere('l.code = :langCode'); + $q->setParameter('langCode', $searchParams->getParameter('langCode')); } if (is_bool($searchParams->getParameter('enabled'))) { - $q->andWhere('l.enabled = ?', $searchParams->getParameter('enabled')); + $q->andWhere('l.enabled = :enabled'); + $q->setParameter('enabled', $searchParams->getParameter('enabled')); } if (is_bool($searchParams->getParameter('added'))) { - $q->andWhere('l.added = ?', $searchParams->getParameter('added')); + $q->andWhere('l.added = :added'); + $q->setParameter('added', $searchParams->getParameter('added')); } if (!empty($searchParams->getParameter('sortField'))) { if (in_array($searchParams->getParameter('sortOrder'), ['ASC', 'DESC'])) { $q->addOrderBy( - $searchParams->getParameter('sortField') . ' ' . $searchParams->getParameter('sortOrder') + $searchParams->getParameter('sortField'), + $searchParams->getParameter('sortOrder') ); } else { $q->addOrderBy($searchParams->getParameter('sortField')); } } - return $q->execute(); + return $q->getQuery()->execute(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -105,8 +109,7 @@ public function searchLanguages(ParameterObject $searchParams) public function getLanguageById(string $id) { try { - $lang = Doctrine::getTable('I18NLanguage')->find($id); - return $lang === false ? null : $lang; + return Doctrine2::getEntityManager()->getRepository(I18NLanguage::class)->find($id); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -123,11 +126,12 @@ public function getLanguageById(string $id) public function deleteLangStrings(array $currentSourceIds, int $sourceId) { try { - $q = Doctrine_Query::create() - ->delete('I18NLangString ls') - ->andWhereNotIn('ls.unitId', $currentSourceIds) - ->andWhere('ls.sourceId = ?', $sourceId); - return $q->execute(); + $q = Doctrine2::getEntityManager()->createQueryBuilder(); + $q->delete(I18NLangString::class, 'ls') + ->andWhere($q->expr()->notIn('ls.unitId', $currentSourceIds)) + ->andWhere('ls.sourceId = :sourceId') + ->setParameter('sourceId', $sourceId); + return $q->getQuery()->execute(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -137,16 +141,16 @@ public function deleteLangStrings(array $currentSourceIds, int $sourceId) /** * @param int $sourceId - * @return Doctrine_Collection|I18NLangString[] + * @return I18NLangString[] * @throws DaoException */ public function getLangStringsBySourceId(int $sourceId) { try { - $q = Doctrine_Query::create() - ->from('I18NLangString ls') - ->andWhere('ls.sourceId = ?', $sourceId); - return $q->execute(); + $q = Doctrine2::getEntityManager()->getRepository(I18NLangString::class)->createQueryBuilder('ls') + ->andWhere('ls.sourceId = :sourceId') + ->setParameter('sourceId', $sourceId); + return $q->getQuery()->execute(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -156,13 +160,13 @@ public function getLangStringsBySourceId(int $sourceId) /** * @param string $source - * @return Doctrine_Record|I18NSource + * @return I18NSource * @throws DaoException */ public function getI18NSource(string $source) { try { - return Doctrine::getTable('I18NSource')->findOneBy('source', $source); + return Doctrine2::getEntityManager()->getRepository(I18NSource::class)->findOneBy(['source' => $source]); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -177,27 +181,28 @@ public function getI18NSource(string $source) */ public function saveI18NSource(I18NSource $i18NSource) { - $i18NSource->save(); + Doctrine2::getEntityManager()->persist($i18NSource); + Doctrine2::getEntityManager()->flush(); return $i18NSource; } /** * @param I18NSource $i18NSource - * @return bool */ public function deleteI18NSource(I18NSource $i18NSource) { - return $i18NSource->delete(); + Doctrine2::getEntityManager()->remove($i18NSource); + Doctrine2::getEntityManager()->flush(); } /** - * @return Doctrine_Collection|I18NSource[] + * @return I18NSource[] * @throws DaoException */ public function getAllI18NSources() { try { - return Doctrine::getTable('I18NSource')->findAll(); + return Doctrine2::getEntityManager()->getRepository(I18NSource::class)->findAll(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -212,24 +217,26 @@ public function getAllI18NSources() */ public function saveI18NLangString(I18NLangString $i18NLangString) { - $i18NLangString->save(); + Doctrine2::getEntityManager()->persist($i18NLangString); + Doctrine2::getEntityManager()->flush(); return $i18NLangString; } /** * @param int $langStringId * @param int $langId - * @return Doctrine_Record|I18NTranslate + * @return I18NTranslate|null * @throws DaoException */ public function getI18NTranslate(int $langStringId, int $langId) { try { - $q = Doctrine_Query::create() - ->from('I18NTranslate t') - ->andWhere('t.langStringId = ?', $langStringId) - ->andWhere('t.languageId = ?', $langId); - return $q->fetchOne(); + $q = Doctrine2::getEntityManager()->getRepository(I18NTranslate::class)->createQueryBuilder('t') + ->andWhere('t.langStringId = :langStringId') + ->setParameter('langStringId', $langStringId) + ->andWhere('t.languageId = :languageId') + ->setParameter('languageId', $langId); + return $q->getQuery()->getOneOrNullResult(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -239,14 +246,13 @@ public function getI18NTranslate(int $langStringId, int $langId) /** * @param string $id - * @return Doctrine_Record|null|I18NTranslate + * @return null|I18NTranslate * @throws DaoException */ public function getI18NTranslateById(string $id) { try { - $translate = Doctrine::getTable('I18NTranslate')->find($id); - return $translate === false ? null : $translate; + return Doctrine2::getEntityManager()->getRepository(I18NTranslate::class)->find($id); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -261,7 +267,8 @@ public function getI18NTranslateById(string $id) */ public function saveI18NTranslate(I18NTranslate $i18NTranslate) { - $i18NTranslate->save(); + Doctrine2::getEntityManager()->persist($i18NTranslate); + Doctrine2::getEntityManager()->flush(); return $i18NTranslate; } @@ -272,7 +279,8 @@ public function saveI18NTranslate(I18NTranslate $i18NTranslate) */ public function saveI18NLanguage(I18NLanguage $i18NLanguage) { - $i18NLanguage->save(); + Doctrine2::getEntityManager()->persist($i18NLanguage); + Doctrine2::getEntityManager()->flush(); return $i18NLanguage; } @@ -285,48 +293,55 @@ public function saveI18NLanguage(I18NLanguage $i18NLanguage) public function searchTranslations(ParameterObject $searchParams, bool $getCount = false) { try { - $q = Doctrine_Query::create() - ->from('I18NTranslate t') - ->leftJoin('t.I18NLangString ls') - ->leftJoin('ls.I18NGroup g') - ->leftJoin('t.I18NLanguage l'); + $q = Doctrine2::getEntityManager()->getRepository(I18NTranslate::class)->createQueryBuilder('t') + ->leftJoin('t.I18NLangString', 'ls') + ->leftJoin('ls.I18NGroup', 'g') + ->leftJoin('t.I18NLanguage', 'l'); if (!empty($searchParams->getParameter('langCode'))) { - $q->andWhere('l.code = ?', $searchParams->getParameter('langCode')); + $q->andWhere('l.code = :langCode'); + $q->setParameter('langCode', $searchParams->getParameter('langCode')); } if (is_bool($searchParams->getParameter('translated'))) { - $q->andWhere('t.translated = ?', $searchParams->getParameter('translated')); + $q->andWhere('t.translated = :translated'); + $q->setParameter('translated', $searchParams->getParameter('translated')); } if (!empty($searchParams->getParameter('sourceText'))) { - $q->andWhere('ls.value LIKE ?', ['%' . $searchParams->getParameter('sourceText') . '%']); + $q->andWhere('ls.value LIKE :sourceText'); + $q->setParameter('sourceText', '%' . $searchParams->getParameter('sourceText') . '%'); } if (!empty($searchParams->getParameter('translatedText'))) { - $q->andWhere('t.value LIKE ?', ['%' . $searchParams->getParameter('translatedText') . '%']); + $q->andWhere('t.value LIKE :translatedText'); + $q->setParameter('translatedText', '%' . $searchParams->getParameter('translatedText') . '%'); } if (!empty($searchParams->getParameter('group'))) { - $q->andWhere('g.name = ?', $searchParams->getParameter('group')); + $q->andWhere('g.name = :group'); + $q->setParameter('group', $searchParams->getParameter('group')); } if ($getCount) { - return $q->count(); + return $q->select('count(t.id)') + ->getQuery() + ->getSingleScalarResult(); } if (!empty($searchParams->getParameter('sortField'))) { if (in_array($searchParams->getParameter('sortOrder'), ['ASC', 'DESC'])) { $q->addOrderBy( - $searchParams->getParameter('sortField') . ' ' . $searchParams->getParameter('sortOrder') + $searchParams->getParameter('sortField'), + $searchParams->getParameter('sortOrder') ); } else { $q->addOrderBy($searchParams->getParameter('sortField')); } } if (!empty($searchParams->getParameter('offset'))) { - $q->offset($searchParams->getParameter('offset')); + $q->setFirstResult($searchParams->getParameter('offset')); } if (!empty($searchParams->getParameter('limit'))) { - $q->limit($searchParams->getParameter('limit')); + $q->setMaxResults($searchParams->getParameter('limit')); } - return $q->execute(); + return $q->getQuery()->execute(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); @@ -341,7 +356,7 @@ public function searchTranslations(ParameterObject $searchParams, bool $getCount public function getI18NGroups() { try { - return Doctrine::getTable('I18NGroup')->findAll(); + return Doctrine2::getEntityManager()->getRepository(I18NGroup::class)->findAll(); // @codeCoverageIgnoreStart } catch (Exception $e) { throw new DaoException($e->getMessage(), $e->getCode(), $e); diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroup.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroup.class.php deleted file mode 100644 index 952f6a3477..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroup.class.php +++ /dev/null @@ -1,17 +0,0 @@ - - * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ - */ -abstract class PluginI18NGroup extends BaseI18NGroup -{ - -} diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroupTable.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroupTable.class.php deleted file mode 100644 index f93fea5749..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NGroupTable.class.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ - */ -abstract class PluginI18NLangString extends BaseI18NLangString -{ - -} diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLangStringTable.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLangStringTable.class.php deleted file mode 100644 index 2d21a2c295..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLangStringTable.class.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ - */ -abstract class PluginI18NLanguage extends BaseI18NLanguage -{ - -} diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLanguageTable.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLanguageTable.class.php deleted file mode 100644 index 21e675a302..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NLanguageTable.class.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ - */ -abstract class PluginI18NSource extends BaseI18NSource -{ - -} diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NSourceTable.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NSourceTable.class.php deleted file mode 100644 index 54180214f1..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NSourceTable.class.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ - */ -abstract class PluginI18NTranslate extends BaseI18NTranslate -{ - -} diff --git a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NTranslateTable.class.php b/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NTranslateTable.class.php deleted file mode 100644 index 3c13e7ffa8..0000000000 --- a/symfony/plugins/orangehrmAdminPlugin/lib/model/doctrine/PluginI18NTranslateTable.class.php +++ /dev/null @@ -1,19 +0,0 @@ -setValue(htmlspecialchars($translatedText)); $i18nTranslate->setTranslated($translatedText == '' ? false : true); $i18nTranslate->setCustomized(true); - $i18nTranslate->setModifiedAt(date("Y-m-d H:i:s")); + $i18nTranslate->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NTranslate($i18nTranslate); } } @@ -158,6 +158,7 @@ public function generateSourceDirFromSource(string $source) * Sync all XLIFF sources language string to database * @throws DaoException * @throws sfException + * @throws Exception */ public function syncI18NSourcesLangStrings() { @@ -170,17 +171,17 @@ public function syncI18NSourcesLangStrings() if ($i18nSource instanceof I18NSource) { // Source already exists $timestamp = filemtime($baseSource); - if ($i18nSource->getModifiedAt() < date("Y-m-d H:i:s", $timestamp)) { + if ($i18nSource->getModifiedAt() < new DateTime($timestamp)) { $this->syncI18NSourceLangStrings($baseSource, $i18nSource->getId()); // Update last sync time - $i18nSource->setModifiedAt(date("Y-m-d H:i:s")); + $i18nSource->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NSource($i18nSource); } } else { // New source $newSource = new I18NSource(); $newSource->setSource($this->getRelativeSource($baseSource)); - $newSource->setModifiedAt(date("Y-m-d H:i:s")); + $newSource->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NSource($newSource); $this->syncI18NSourceLangStrings($baseSource, $newSource->getId()); @@ -278,6 +279,7 @@ public function deleteRemovedLangStringsFromDatabase(array $currentSourceIds, in * @param string $langCode * @throws DaoException * @throws sfException + * @throws Exception */ public function syncI18NTranslations(string $langCode) { @@ -291,11 +293,11 @@ public function syncI18NTranslations(string $langCode) $i18nSource = $this->getI18NDao()->getI18NSource($this->getRelativeSource($source)); if ($i18nSource instanceof I18NSource && $i18nBaseSource instanceof I18NSource) { $timestamp = filemtime($source); - if ($i18nSource->getModifiedAt() < date("Y-m-d H:i:s", $timestamp) + if ($i18nSource->getModifiedAt() < new DateTime($timestamp) || $i18nSource->getModifiedAt() < $i18nBaseSource->getModifiedAt()) { $this->syncI18NSourceTranslations($baseSource, $source, $language); // Update last sync time - $i18nSource->setModifiedAt(date("Y-m-d H:i:s")); + $i18nSource->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NSource($i18nSource); } } else { @@ -303,7 +305,7 @@ public function syncI18NTranslations(string $langCode) // New source $newSource = new I18NSource(); $newSource->setSource($this->getRelativeSource($source)); - $newSource->setModifiedAt(date("Y-m-d H:i:s")); + $newSource->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NSource($newSource); } } @@ -343,6 +345,7 @@ public function getLangStringsBySourceId(int $sourceId) * @param int $langId * @param $langStrings * @throws DaoException + * @throws Exception */ public function saveTranslationsFromSource(string $sourceFile, int $langId, $langStrings) { @@ -361,7 +364,7 @@ public function saveTranslationsFromSource(string $sourceFile, int $langId, $lan } else { $translate->setTranslated(false); } - $translate->setModifiedAt(date("Y-m-d H:i:s")); + $translate->setModifiedAt(new DateTime()); try { $this->getI18NDao()->saveI18NTranslate($translate); } catch (Doctrine_Exception $e) { @@ -371,7 +374,7 @@ public function saveTranslationsFromSource(string $sourceFile, int $langId, $lan if (!$i18nTranslate->getCustomized()) { $i18nTranslate->setValue($translate->getValue()); $i18nTranslate->setTranslated(!empty($translate->getValue())); - $i18nTranslate->setModifiedAt($translate->getModifiedAt()); + $i18nTranslate->setModifiedAt(new DateTime()); $this->getI18NDao()->saveI18NTranslate($i18nTranslate); } } @@ -453,7 +456,7 @@ public function getLangPackPath(string $source, string $langCode = self::DEV_LAN public function markLanguageAsModified(string $langCode) { $lang = $this->getI18NDao()->getLanguageByCode($langCode); - $lang->setModifiedAt(date("Y-m-d H:i:s")); + $lang->setModifiedAt(new DateTime()); return $this->getI18NDao()->saveI18NLanguage($lang); }