diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e8143d1..2f41675d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,9 +13,9 @@ jobs: php --version node --version - run: sudo apt-get update - # dependency needed for gd exentions - - run: sudo apt-get -y --no-install-recommends install libfontconfig1 libxrender1 libxext6 zlib1g-dev libpng-dev libfreetype6-dev libjpeg8-dev - - run: sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* + # # dependency needed for gd exentions + # - run: sudo apt-get -y --no-install-recommends install libfontconfig1 libxrender1 libxext6 zlib1g-dev libpng-dev libfreetype6-dev libjpeg8-dev + # - run: sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* # load composer cache - restore_cache: keys: @@ -26,7 +26,7 @@ jobs: # these rules match the ones enabled by default by the "fterrag.vscode-php-cs-fixer" vs code extension - run: php vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix . --dry-run --verbose --rules @PhpCsFixer # build static assets including templates - - run: php build.php + - run: php build/build.php # install again, but with no dev dependencies this time (for deploy) - run: composer install -n --optimize-autoloader --no-dev # save composer cache @@ -118,7 +118,11 @@ jobs: # deploy gcloud app deploy app-<< parameters.serviceName >>.yaml --version ${CIRCLE_BUILD_NUM} gcloud app deploy cron.yaml dispatch.yaml --version ${CIRCLE_BUILD_NUM} - + - run: | + # deploy to google run too + gcloud run deploy dropapp-test --source . --project ${GOOGLE_PROJECT_ID} \ + --add-cloudsql-instances=${<< parameters.envVariablePrefix >>DBNAME} \ + --set-env-vars GOOGLE_CLOUD_PROJECT=${GOOGLE_PROJECT_ID} create-sentry-release: docker: - image: circleci/node:4.8.2 diff --git a/.docker/.gitkeep b/.docker/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile deleted file mode 100644 index 3cbc32be..00000000 --- a/.docker/php/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM php:7.4.25-apache -# enable mod_rewrite -RUN a2enmod rewrite -# install needed libraries -RUN apt-get update \ - && apt-get -y --no-install-recommends install libfontconfig1 libxrender1 libxext6 zlib1g-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -# PHP extensions -RUN docker-php-ext-install pdo_mysql exif gd -# Enable xdebug for debugging & profiling -RUN pecl install xdebug && docker-php-ext-enable xdebug gd \ No newline at end of file diff --git a/.docker/php/dropapp.conf b/.docker/php/dropapp.conf deleted file mode 100644 index 85a40e5f..00000000 --- a/.docker/php/dropapp.conf +++ /dev/null @@ -1,25 +0,0 @@ - - ServerAdmin webmaster@localhost - DocumentRoot /var/www/html - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # Prevents browsers from receiving a 400 error when sending Auth0 cookies - LimitRequestFieldSize 12392 - - - Options +FollowSymLinks -MultiViews - - # Don't look for .htaccess files, etc. - AllowOverride None - Order allow,deny - allow from all - - RewriteEngine On - - RewriteCond %{REQUEST_URI} !^/assets - RewriteCond %{REQUEST_URI} !^/uploads - RewriteCond %{REQUEST_URI} !^/gcloud-entry.php - RewriteRule ^(.*)$ /gcloud-entry.php/$1 [L,QSA] - - \ No newline at end of file diff --git a/.gcloudignore b/.gcloudignore index 2b357a61..7280e813 100644 --- a/.gcloudignore +++ b/.gcloudignore @@ -18,5 +18,4 @@ # other folders to ignore .docker phinx.yml -docker-compose.yml -build.php +docker-compose.yml \ No newline at end of file diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 00000000..0799ddc9 --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.1.13","version":"3.13.0:v3.13.0#a6232229a8309e8811dc751c28b91cb34b2943e1","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"array_indentation":true,"blank_line_before_statement":{"statements":["break","case","continue","declare","default","exit","goto","include","include_once","phpdoc","require","require_once","return","switch","throw","try","yield","yield_from"]},"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"empty_loop_body":true,"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"heredoc_to_nowdoc":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"multiline_whitespace_before_semicolons":{"strategy":"new_line_for_chained_calls"},"no_extra_blank_lines":{"tokens":["attribute","break","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","return","square_brace_block","switch","throw","use"]},"no_null_property_initialization":true,"no_superfluous_elseif":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","negative_instanceof","others","return","switch_case","yield","yield_from"]},"no_useless_else":true,"no_useless_return":true,"operator_linebreak":{"only_booleans":true},"ordered_class_elements":true,"php_unit_internal_class":true,"php_unit_test_class_requires_covers":true,"phpdoc_add_missing_param_annotation":true,"phpdoc_no_empty_return":true,"phpdoc_order_by_value":true,"phpdoc_types_order":true,"phpdoc_var_annotation_correct_order":true,"return_assignment":true,"single_line_comment_style":true,"whitespace_after_comma_in_array":{"ensure_single_space":true},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true,"allow_single_line_closure":true},"class_definition":{"single_line":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_imports":true,"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"echo_tag_syntax":true,"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_singleline":true,"no_unneeded_curly_braces":{"namespaces":true},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_nullsafe_operator":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_line_comment_spacing":true,"single_quote":true,"single_space_after_construct":{"constructs":["abstract","as","attribute","break","case","catch","class","clone","comment","const","const_import","continue","do","echo","else","elseif","enum","extends","final","finally","for","foreach","function","function_import","global","goto","if","implements","include","include_once","instanceof","insteadof","interface","match","named_argument","namespace","new","open_tag_with_echo","php_doc","php_open","print","private","protected","public","readonly","require","require_once","return","static","switch","throw","trait","try","type_colon","use","use_lambda","use_trait","var","while","yield","yield_from"]},"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"yoda_style":true},"hashes":{"index.php":"f4858890162868a04ca4b63bf1a0ce6d","ajax.php":"b9716759e326f0bd998012ee447f6507","include\/cms_users_edit.php":"5e2ebb26ad4726f866172208352d2ba9","include\/cms_users_page.php":"a590ee36076808595409fa2e5d650507","include\/sizes_edit.php":"ddc10594ea9913f48591bf0ae9505425","include\/organisations.php":"65085b2b60074a1da3cd977f11502c09","include\/libraryhistory.php":"4952ceb71a07d5933eafe7db495d38bf","include\/stock_confirm.php":"44e3f36af96dfeca60270e9459c478cd","include\/check_out.php":"a45a310fbad08033b2b008b5e6d08f0d","include\/sales_list.php":"ecbf60c654b32891054162f7e55b4111","include\/people_photo.php":"95bc91b369f61a045d975cd7e542df7c","include\/cms_functions_edit.php":"b76a97644e16281a3c2d9d10ed95eb54","include\/library_inventory_edit.php":"8dab58584cd3fbb2def42451e2e81510","include\/cms_translate_edit.php":"93e79b25044eebf9396b39870ba2efee","include\/printed_list_people.php":"e66a90b072e11d0dc41253d3a578e28d","include\/cms_settings.php":"da8d2f9e15c0eed59bca5e2ccbb9fe90","include\/give.php":"48add6e1c7e1978bbd1ae033f294c89e","include\/products_edit.php":"6e8020ad98c6a9606bdc2c438705aecf","include\/laundry_edit.php":"66ea234ddc8512e31fe26071e5ec464e","include\/price_list.php":"618590c82a43b99f2d782096b650b166","include\/cms_users_expired.php":"dea206f4920004a01099a05fd3cd7be1","include\/stock.php":"fe29bd9bdb3ff5040aebb5e28c432705","include\/cms_profile.php":"9416fd513dc34febbfaf1e9bd20770f7","include\/stock_export.php":"436fac3ff6788084a1d5f7b0301e72b9","include\/cms_users_handle_ajax_operations.php":"a2a28d65883552547b04a9a50a75273b","include\/people_deactivated.php":"4c0ba8a9e2ded22673ca383160d1a8ae","include\/downloads.php":"1dfa8cbddc86dba7c75d49c29061c6d0","include\/library_edit.php":"219950dd42c60da2b83bca684ed10f66","include\/locations.php":"3f5639c8cb2caea8c563e21d56ca4839","include\/printed_list_people_oud.php":"ff3e0f52ba949d094bfa10d3c189b1c1","include\/library.php":"5e7f5b58b2b97ea06d5dfd9040144d31","include\/laundry_startcycle.php":"be8152d5760014a19d13f2a529268b27","include\/people_add.php":"e569186019d60090b00e7ab6e494fb10","include\/stock_overview_edit.php":"f6b234a846adf040a793efc24e970435","include\/cms_usergroups_edit.php":"4dfda2ebec426391ba4a8fc2ef4006c8","include\/stock_edit.php":"0bdde768abd66ca424b78a707f10b5f9","include\/products_export.php":"6ee15c49b1e5a46de23d357614991229","include\/stock_overview.php":"4b4104fd3d6d4c8a63444104d3402980","include\/container-stock.php":"f406ac4155623b9fad48ccca2879205e","include\/library_inventory.php":"58dcd80398950be1a96424db8db1ed59","include\/camps.php":"4ed42d5bdb154f3b0042179f9a8b2de0","include\/food_lists.php":"91d0c5c68325d84434c976ab6c3edd66","include\/people_export.php":"f41ae39442d132840a90d482b492421a","include\/give2all.php":"8d5bc29ec6968b591dc69aef1d50a334","include\/laundry.php":"3679e13109df5a9c67c190b02ceef796","include\/borrowhistory.php":"b3dd4e72c4c56f31643f5b2f3deff411","include\/borrow_edit.php":"69281d0021bbd6e58e991b9da39782cd","include\/borrowedititem.php":"77092847d43de92119c9ce72eb7064fd","include\/tags.php":"e73df3569c75f50c9b7e98bc4b8ee230","include\/camps_edit.php":"1e7956fd57dba5e1d90aa42aafce602c","include\/exitloginas.php":"4aa5874a91f4ff2ad271dc279bb898f5","include\/cms_users.php":"3a99ab060d5bdf529bf5f761f3ca64cc","include\/cms_translate.php":"7030f42d8e3eb0b41e43cf37b347ebad","include\/cms_usergroups.php":"17e99389d738c36fb85d3ae2bb5c9192","include\/qr.php":"6559b0cfbcb94a4507ab9845e134e540","include\/sales_list_export.php":"bfff9b55fef555ab149a31e44d830da4","include\/products.php":"84ce788ed867d1a6919f79504e7ec5c8","include\/laundry_noshow.php":"e0d458d850c65b7d18981f8c273c0bf6","include\/cms_users_deactivated.php":"bfb4e2f61219bc5f5a0cd83bf7ef263c","include\/people_edit.php":"9f006bf0a21c271fb6283a2533a7d070","include\/borrow.php":"c7bb1b00642efe14421f7fd585cb0e05","include\/fancygraphs.php":"74281fddac6893bbf2ee2704f3b5b17e","include\/container-stock_edit.php":"2070b9dd0a9420f77ba9ffd50e732f3e","include\/cms_settings_edit.php":"3b00908d43061a83c451bcde4572dce5","include\/cms_functions.php":"980dd01f8aa4e6c08ac8a125f7f553d8","include\/sizes.php":"ef76f6353e65bb7e105bf5223f0d2cfe","include\/market_schedule.php":"3bc4ede1fc1ba6bd9c675ca3e965bd6f","include\/vegetables.php":"650319aa2f10bb24ea027f32f08be951","include\/locations_edit.php":"77eda1dbf03c15668c58cbade5a2646d","include\/start.php":"faff1ebeccde9136d5cb405ba4b9972e","include\/people.php":"1563c181e27e839c0631346eb153bd5a","include\/tags_edit.php":"481bcb6af7d01cc832056b0776817954","include\/organisations_edit.php":"1de9c54b2e39a3d81a6c51c9768d9bc1","cypress-session.php":"59496d01e6a0a514946d57cef59c4f24","pdf\/pdf-card.php":"7f5f3ad7f148917e2b79b4840dec81b4","pdf\/idcard.php":"57fc9e2f907f51fe77b1fe6fab69458c","pdf\/dryfood.php":"de52b280e20e9b60210b449cc2b2be0a","pdf\/workshopcard.php":"9af2dcf206a5f3b66d824a2fd97ebf83","pdf\/occcard.php":"26b1bff80d06d276ff10bd1a5404cb3d","pdf\/bicyclecard.php":"c2f8a12c5d37996ecffaae3fa1108b47","pdf\/qr.php":"abe6089300bdbbb0a2e97c7431d63dea","pdf\/pdf.php":"b04832f2613c72d39254134f6f92271f","pdf\/fpdf.php":"e8e116c421d15bd2646cfc0a0f410084","pdf\/fonts\/OpenSans-Regular.php":"585d64cc081c31aa2a5aa1e9afcca296","pdf\/fonts\/helveticab.php":"5995608c7ddcdc8a2f5e47c3c5456ef5","pdf\/fonts\/OpenSans-BoldItalic.php":"56383d8abadbf8056ac5b62615137c4b","pdf\/fonts\/helveticabi.php":"28d82ac96ca2b7e62ab4d1e485768a32","pdf\/fonts\/OpenSans-Bold.php":"a64518a78d178c8cb8a976e04967f98f","pdf\/fonts\/OpenSans-Italic.php":"6e60be2b33090a4f85a81ae1c411e37e","pdf\/fonts\/helvetica.php":"739d5fdb092d158dca79fda90ebfcf14","pdf\/fonts\/helveticai.php":"924bba6e65d65323fb7938c40202da9f","library\/functions.php":"9172a74604065ae4d588f76e7f4036a6","library\/gcloud.php":"4ec822cc16dd23f8e93172f13d88cefc","library\/config.php":"1a37ef10ec44cdf417e13bcb7d713ab0","library\/error-reporting.php":"f595e79764a7770b7af8e57a20d99c53","library\/constants.php":"c77ff105ca56b5606ceefcbc35691a1f","library\/lib\/loginNotifications.php":"e3fe32c032f3c2dae8536718a28072b7","library\/lib\/errorhandling.php":"b41364120ae3990e2d6869a7cbf6f8c7","library\/lib\/mail.php":"d641bf9627c7cf7637703f210f5833c5","library\/lib\/database.php":"1c57bca639b9e12ead8d4285704df9b1","library\/lib\/session.php":"0b059bc94a38cb879c5819c2b9d850ca","library\/lib\/translate.php":"f0012a2e47e00d1eb475a26e144e999c","library\/lib\/tools.php":"9c2ee2ecf3c4c7945be5ddf7c66a3567","library\/lib\/csvexport.php":"256d2b97cfc7d868fb3220afe83631e1","library\/lib\/list.php":"7580614f020bc8073706971d98426fad","library\/lib\/formhandler.php":"6d9eb5eaa40b4f72b79b71dafd6cc44d","library\/lib\/smarty.php":"8d58761996b4a43e243cb77be9dabea1","library\/lib\/auth0.php":"893ecde2fe570eb4532f4a8fc511c645","library\/lib\/form.php":"5fc8c5501ca858cbf6576f1590e55150","library\/core.php":"04682870e460181f39e0e9d09ad5fbd2","library\/ajax\/checkconnection.php":"96bda5d3f8f130e28dfb5ef8a5c0e182","library\/ajax\/checkusersmenu.php":"f1363092448253984bee22095a1ede2c","library\/ajax\/checktag.php":"fc4469ef37ea1521e9a46dca1838dfac","library\/ajax\/checkout.php":"36c3d21f3e575483b5da8f1e67b909b4","library\/ajax\/history.php":"e3cec56e072d75d9c5b5bc6fcdb3a5b6","library\/ajax\/laundry.php":"768523415f2bc90a7ba7343a01d63f59","library\/ajax\/testdbdelete.php":"878e47a7f27292a242f0efbb5324e64e","library\/ajax\/getsizes.php":"38990003ba8e1550fea077909b019666","library\/ajax\/deleteprofile.php":"b6762f4230c55382e34700a8e17df7d9","library\/ajax\/testauth0user.php":"e269cbf21248242be4eca0a917b5a32b","library\/ajax\/getproductvalue.php":"9452224c4584b94a0fe51c4322c5f0c3","gcloud-entry.php":"33ef60198acb577b4026b77042cfdc4f","fake-error.php":"931754c62799c6c7f1256f34365852cb","mobile\/saveassignbox.php":"4645b0c9b99c70f81652123cb977da23","mobile\/findbox.php":"1b40396eac3788c6245236aeb788d858","mobile\/move.php":"a46b8ee6778917c3bc907c7c92f1e323","mobile\/editbox.php":"cdc7155355abd611f4851c17916e795b","mobile\/newbox.php":"795baa6268186e2c865a69eaf384a479","mobile\/changeamount.php":"ce82d7164596c883a1131d67755ebfd1","mobile\/vieworders.php":"7793af3b2ee584a56f43a64b5e7f58a8","mobile\/saveamount.php":"412985fb4f59aec341555edec8184856","mobile\/savebox.php":"55337de526a97dbeaaaad5121a9cbf34","mobile\/barcode.php":"af7db9cc129e9d4a2f1cd59955574b8e","mobile\/assignbox.php":"be5fb11c5930c649504989dc711279b4","mobile\/selectorganisation.php":"d22aea7867a9871487ea6984be078c42","mobile\/start.php":"b9aef8efcc59659d185addad114e658d","mobile.php":"91d000b5f22ebba3be87ea7d62677e94","db\/migrations\/20210823064211_make_cms_users_id_unsigned.php":"5e9d67907d5cbf75de66398e6612695c","db\/migrations\/20220722085453_dirstro_events_table.php":"67982d9d004ef8c2d4c7906e9a9fa220","db\/migrations\/20191105181704_add_unique_constraint_qr_code_legacy.php":"9aee8ab65e71641fe3e1f4d030cb0875","db\/migrations\/20220515130043_rename_people_idto_object_idin_tags_relations.php":"71b2663667e4fc2e6468c0b064cd8186","db\/migrations\/20200202170149_set_visible_default_to_one_in_locations_table.php":"7ead2e8a38d99b66838a0559612f5224","db\/migrations\/20190912133947_foreign_key_camps.php":"a0a5ce9e0ff4b9206b283ca301571c09","db\/migrations\/20190923140058_foreign_key_locations.php":"7bbbf95e3b1c3725c3e86cba75b98a25","db\/migrations\/20201213100955_update_delete_constraint_for_tags.php":"a03ea27aa19d19d9a67153068bdfdc26","db\/migrations\/20190925135319_foreign_keys_library_tables.php":"9f808b2de48e011f4b570f03ab6e5abc","db\/migrations\/20220723060012_dirstro_events_unboxed_item_collections.php":"3ba54830a702f4ce3555c8aa6dec98b6","db\/migrations\/20220605074623_make_product_sizegroup_id_not_nullable.php":"6e61c136ad0bf2e15df47fb5c465b9f2","db\/migrations\/20191202131340_adult_age_in_camps_table_not_null.php":"2f817dff02cbccc21d1605e61c9a6e9f","db\/migrations\/20191019135153_change_fk_in_sizes_to_sizegroup.php":"921c0e4d25b1e08cea5ce86c8d712937","db\/migrations\/20220701094153_add_shipment_detail_table.php":"fc002b1d5975d08121606efc0b4616b7","db\/migrations\/20190703090715_add_parent_id_in_product_categories.php":"94aaab1d99fac7a2da664027c92a2bd9","db\/migrations\/20191001093637_foreign_key_people_id.php":"94754a6bb7c31ac0145afc59ec0b41fe","db\/migrations\/20190721142832_add_signature_date_in_people.php":"e3371d4da407f69548fe16cd18189165","db\/migrations\/20190621183422_add_currency_name.php":"32b3742cf0465a987f09e1ccd82871d4","db\/migrations\/20190610113824_initial_schema.php":"0917214b0b593d5bc8a751c354546e4c","db\/migrations\/20200706220401_drop_organisation_id_from_cms_users.php":"315e07b98850d8010451cac2c768b44f","db\/migrations\/20190725174628_add_resettokens_column_to_bases.php":"49ed454fbf80a3726235f3755dd3d5dd","db\/migrations\/20220701094148_add_shipment_table.php":"6fab5c57a826eee30f7b1c17e4cfc437","db\/migrations\/20190623073649_make_organisation_in_cms_users_foreign_key.php":"06a8129bc08638d70de27fa26287cd28","db\/migrations\/20220605064603_add_product_category_id_foreign_key.php":"4293ef39bbb31c05b08a5a6752a883ba","db\/migrations\/20200706225754_add_composite_unique_index_for_cross_reference_tables.php":"a067a2f09471fadbf93140939a595564","db\/migrations\/20200313200406_remove_needed_items.php":"ed5208b256fc18711b2e261333084086","db\/migrations\/20191013180000_itemsout_nullable.php":"bc1ef96c7f69dd3febd7ef2497441bc8","db\/migrations\/20190612100627_add_station_to_laundry.php":"035c27ee2fc6cf94a665be73de4787c3","db\/migrations\/20220604185546_remove_portion_column_in_sizes.php":"1320f8faa43b6e31e505f340144f4678","db\/migrations\/20200608185725_add_box_state.php":"a8c1a6755004373deea2a6a3869acefc","db\/migrations\/20191211131857_make_people_id_in_transaction_table_nullable.php":"46e7dc4f0fca2036ecb7501f770b07d6","db\/migrations\/20191021155925_add_fk_for_location_in_stock_table.php":"b7d589cb430fc38f9f25a3d1af333b87","db\/migrations\/20220822183629_add_flow_direction.php":"1948a9fbb307a5eba91649368963b964","db\/migrations\/20210823070448_make_tag_id_unsigned.php":"d71c8124802a8f66fd97a576542b8e83","db\/migrations\/20220604184037_make_label_fields_not_nullable.php":"6d9e67e2839d327cc88f48e162d09519","db\/migrations\/20220701094045_add_transfer_agreement_table.php":"389e17b7419fd694f0bc7e57f53d6ac2","db\/migrations\/20220822175013_add_distro_event_tracking_group_id_column.php":"80a002c32bd8883943fc56de6aab971b","db\/migrations\/20210823064828_make_gender_id_unsigned.php":"bf1ae856cd941faa629d02517641b301","db\/migrations\/20190923101044_foreign_keys_users.php":"ce2bc6e35b5d841782e836f627a55d54","db\/migrations\/20191005183100_foreign_key_remainder.php":"b641b44127383d34492802ea61912f7e","db\/migrations\/20200203194629_make_user_id_nullable_in_history_table.php":"588c272a083be4575526f33e7a82d71e","db\/migrations\/20220605061343_drop_product_category_id_foreign_key.php":"ad5f36bc45534be7c4ef96707e090dfe","db\/migrations\/20220205073523_add_action_permissions_to_cms_functions.php":"3e2354e8ff53e346b75d4f05e39fff33","db\/migrations\/20191028074813_add_legacy_column_to_qr_table.php":"a5f0a4c318b35a17c190b8d72355f7c5","db\/migrations\/20200206100256_add_is_scrap_flag_to_locations_table.php":"ea7f3f638f1babaacb9c43a60378edeb","db\/migrations\/20190703153854_allow_null_for_product_deleted_table.php":"f052bdc84dc4e43b149e2333c0e300f7","db\/migrations\/20190923105735_foreign_keys_language.php":"80ad3b745e1670ea3110d287c7087951","db\/migrations\/20220515130202_add_object_type_in_tags_relations.php":"e5dd7cb401758b4595072457db822706","db\/migrations\/20191001141152_foreign_key_sizes.php":"f63847eb0a445a45c4bb08ae6428f3f5","db\/migrations\/20191019131459_change_cross_reference_delete_rule_to_cascade.php":"d2843949306d916b4fe3f7392869b6d7","db\/migrations\/20220605084444_create_composte_index_on_history_table.php":"15d2fe075d7392fb9e67f10b8e05baff","db\/migrations\/20190925105800_foreign_key_laundry_tables.php":"845a7c6591ea4bd7cdb544dcf0db9764","db\/migrations\/20220605075402_make_product_camp_id_not_nullable.php":"de6dfdc23d3558fc0df4782a7099389d","db\/migrations\/20220604165328_remove_underscore_columns.php":"eb50d8fd2a76f0632acc3d38568f3b4c","db\/migrations\/20190701120113_fix_usergroups_foreign_key.php":"de33422816917a4f54fe5898601be328","db\/migrations\/20220602091709_add_seq_to_tags.php":"72cee4caf674dd566486f8914e95a773","db\/migrations\/20190623123844_add_foreign_keys_in_user_mgmt.php":"3345ff3bc32010afd4fbc931815fcb3d","db\/migrations\/20190930225021_foreign_key_qr.php":"0a7660a9438e2184a3a3bb4e527734f3","db\/migrations\/20220822191744_rename_distro_events_outflow_logs.php":"77be78ed790ec43b110a2f58fc88da2c","db\/migrations\/20220604182719_make_items_in_stock_nullable.php":"062701f802ffcaa16081d16c842cb83d","db\/migrations\/20190613224510_usergroups_levels.php":"31a3971d9d9e0c1176f211af6b62ab2d","db\/migrations\/20220513080431_add_type_to_tags.php":"96368ec8aaad822e01a250ac8b34a0cd","db\/migrations\/20210314130614_unique_constraint_qr_id_in_stock_table.php":"0e64435a3469d134fe4747672c4afd52","db\/migrations\/20190703082355_add_product_foreign_keys.php":"5424098498802d6fd62cb9e164b07cb6","db\/migrations\/20210823063551_make_cms_functions_id_unsigned.php":"a65335ae24d5b6edb0720e406b936bc2","db\/migrations\/20210823070205_make_size_id_unsigned.php":"7b9bfec7ecdc7ed01d4d25a4a4e8b4ff","db\/migrations\/20220723064611_add_distro_events_to_stock.php":"fdf2ae7e249be5de18a26c5c14a00aef","db\/migrations\/20220604164558_make_comment_fields_nullable.php":"4af6e5701426f2c1c74ce0cc367f8b92","db\/migrations\/20210822075141_make_box_state_id_unsigned.php":"954438144beccb559500d23ed725f517","db\/migrations\/20220605074638_add_product_sizegroup_id_foreign_key.php":"b8ed9f53aee0290087f279b8435e24b1","db\/migrations\/20190613211018_new_user_mgmt.php":"5e90533a13c6a35666fc1c4353b6ace1","db\/migrations\/20220822172951_distro_events_tracking_groups.php":"37b15e68000a834e30fa725f12ee1b45","db\/migrations\/20220723063203_add_distro_events_columns_to_locations.php":"4f8857565c5583335dd8dd6783ab0577","db\/migrations\/20191024152307_add_missing_fks.php":"d430dc0ff5ba5a6681fffbd269d53f9c","db\/migrations\/20210823070632_make_transaction_id_unsigned.php":"9de3799a052908ca2efec76c878853dc","db\/migrations\/20200824185532_create_people_tag_cross_reference.php":"80372478d41a8931eeca678734498b2b","db\/migrations\/20220701094049_add_transfer_agreement_detail_table.php":"4056f15325682dfbe80f46187e4d21ab","db\/migrations\/20190703145717_clean_up_products_table.php":"cc519999d91b76f65cc490c7dd8ee8e2","db\/migrations\/20220605081726_drop_product_amountneeded_column.php":"a9dcc3f9a4f4e6ee323d8d02465a94a9","db\/migrations\/20220822191943_add_distro_event_tracking_group_id_foreign_key.php":"12d62447832525f5427658a307ea262b","db\/migrations\/20191105181657_add_unique_constraint_stock_boxid.php":"246cc222e100a02cdab8b20debe7a3fe","db\/migrations\/20220605075347_drop_product_camp_id_foreign_key.php":"933f299c78f0c21a7ce938764bff720a","db\/migrations\/20220822182632_drop_distro_event_id_foreign_key.php":"7ccfc5210e107f389c48d14f5d418a04","db\/migrations\/20190622184117_add_organization_ids_to_cms_users_table.php":"1c53a693e02808fc0b29824829045717","db\/migrations\/20190623140300_add_deleted_column_to_organisations.php":"89c850bf3590443492665bfa23125d5a","db\/migrations\/20191027225630_add_deleted_column_to_locations.php":"0bd4722a4a33c830a1d55178641decde","db\/migrations\/20220723052618_dirstro_events_packing_list_entries.php":"5373f2a48c2d362f48e054f586ef8ef2","db\/migrations\/schema.php":"334cf80559d7aa86f1587e193e580d3b","db\/migrations\/20220205084503_add_cms_user_groups_roles.php":"aac75a200189e13a1e964275835b20e4","db\/migrations\/20220605075413_add_product_camp_id_foreign_key.php":"58751431c60780efb44e7db074c42e62","db\/migrations\/20210823065128_make_location_id_unsigned.php":"f341f161cb402c80f81f4c4b2ab5629c","db\/migrations\/20210823065917_make_product_id_unsigned.php":"5c8890ee6934dd3431a67e58950ba46e","db\/migrations\/20190616152410_after_rotterdam_sprint.php":"75fee4a8697493db04ed8626f5d81ec6","db\/migrations\/20220605064416_make_product_category_id_not_nullable.php":"aa103942a8ee0ceec13b1f2f7ab60455","db\/migrations\/20220513124241_alter_people_tags_to_tags_relations.php":"74d81c934b161ecbdd3631960d32a2f1","db\/migrations\/20191202135024_user_id_in_transactions_nullable.php":"03c0e8d264c3ca29439f2d529e83a539","db\/migrations\/20190924152152_users_created_modified.php":"72b05c55c2149b3684505d0ccb71939a","db\/migrations\/20191001145902_foreign_key_product.php":"e29514909cad34146e2dd7ed07285c4c","db\/migrations\/20210130175622_add_settings_for_bases.php":"0d441d397a1f5f40abc24a53e81b64ab","db\/migrations\/20210823065359_make_people_id_unsigned.php":"eb7453326dd3a7922d6ef50eb97c008f","db\/migrations\/20200923172713_add_tag_description.php":"af16135f330ae1bf7e65943b37eef6d3","db\/migrations\/20190927155724_foreign_key_borrow_tables.php":"a89fd7b591a3c9840c1cdcdbf82efecc","db\/migrations\/20190614143640_add_organisation_column.php":"c6f19f2bb16e34dae07164b6f09b2243","db\/migrations\/20191019134931_change_fk_in_products_to_camps.php":"fd32940b4822cd57441ad3a82db261ef","db\/migrations\/20191023152307_change_collation_and_encoding_to_utf8.php":"5cd0099389b230081a7bec04df86e04f","db\/migrations\/20191005183200_foreign_key_cmsfunctions.php":"70dda04c31b9394ae1c55d62c20fb434","db\/migrations\/20190623100406_add_deleted_column_to_usergroups.php":"4e400a4ec5d53a04baaa59f641fa7371","db\/migrations\/20200824171337_add_tag_table.php":"20a0d34b355cbd53aa40f7f1a3c6302f","db\/migrations\/20220605074604_drop_product_sizegroup_id_foreign_key.php":"fff5e321a39aaf7da9b38d697ac37150","db\/migrations\/20220723061731_dirstro_events_outflow_logs.php":"9b917807f9d7c389dccc939e605b49e4","db\/seeds\/ActionPermissions.php":"645f9d6fbb5c5e83a36659abc043cef9","db\/seeds\/Demo.php":"38630e49da86155e00b513a9fbbd6aa1","db\/seeds\/Cypress.php":"2aa5833f62b80325d2889eed949598ea","db\/seeds\/ClearDb.php":"3b6fe0abd8c7767fdb11dd12f04ae048","db\/seeds\/DemoUsers.php":"ecc4b6b96aff7435ee4242def6e4b112","db\/seeds\/Minimal.php":"1ee5255f536d43c680def68d14b6c185","templates\/templates_c\/b56af85317a2a6f1d86a4656d888d1eecadb8146_3.file.cms_form_line.tpl.php":"ea1a33e49b4cb8c2519591db6e9072e8","templates\/templates_c\/1350be36425173921044e4ba77a73f7a0ac6d1c6_3.file.cms_list_text.tpl.php":"0d1f51be39cff46a6951f416190d70ad","templates\/templates_c\/e2ea52c84d26053551488ee109ac8cb1b794534c_3.file.cms_form_text.tpl.php":"6bd206efd018fbfe17d30e71b0acdc5e","templates\/templates_c\/96b561e3337ac22f90567c7d0f79181ce57b9639_3.file.cms_form_date.tpl.php":"fedafc1a8645aee8469d557c14442d60","templates\/templates_c\/d335ce3c12012b60aa80f899ee4fea08367bedaa_3.file.cms_list.tpl.php":"ccd9976df204cff53e17639b4292f362","templates\/templates_c\/a9fb274994b13233b9f7b1b6679509b0159ffd16_3.file.cms_error.tpl.php":"1eb8123b496d4bdf9f85abb1b2c411c0","templates\/templates_c\/47e82937b36cdc36c7762b13c8b7525ef6d09c35_3.file.cms_list_html.tpl.php":"6eec0a691ab817cc9a7a7c0e33145eec","templates\/templates_c\/e6d6cf6a056c7c785a54018fcea76a6df78d3645_3.file.cms_form_textarea.tpl.php":"101c94ea8b6e723001932d1e19126850","templates\/templates_c\/f557abdc2782601b4ead697e334efe54b9e0350f_3.file.cms_index.tpl.php":"29e485f93b3ec18237966e8027dc15e1","templates\/templates_c\/7d78c007f7fa7c85846af6b5a7ed05de8842f1d1_3.file.cms_form_hidden.tpl.php":"4fa48e304f80f96492dd6102eff2df79","templates\/templates_c\/4055a5920c89a8fe5472c459e35fcd60bdc44c77_3.file.cms_form.tpl.php":"f4aefa820fc6493c21ebc44d12c7a06d","templates\/templates_c\/804a8afe3fab5b78378ae576b92a0d98c4cad260_3.file.cms_form_checkbox.tpl.php":"41de708141a59f3b585d803cf3b70cea","templates\/templates_c\/f2caa4609c4f5dde0ff80a38aeabb6c9b018b0b6_3.file.cms_form_signature.tpl.php":"cce3d3bc2e9df4430b27958089273da1","templates\/templates_c\/c44454be85fc7fb99a6d4823d24fc7d3acda7c38_3.file.cms_form_select.tpl.php":"22c659a2640e39904bb8e0fe42d60d58","templates\/templates_c\/8521a60ec97f4a1bd777017e2875965655bed61c_3.file.start-market.tpl.php":"fb40bbeb30e1d3227317e97adc3eeea9","templates\/templates_c\/5d56eb8048a9bb6e887db273e9731ddb221b14ed_3.file.cms_list_toggle.tpl.php":"a53cc0b29c8aaa7e92dec98b90c02932","build\/jsmin-1.1.1.php":"a13d64f29501119ea54ffd24d27803a4","build\/pack-css.php":"f1a71f87507b80c819b911e810588553","build\/build.php":"9c7a1a7aea5f338f4eb45a7eeab3b09a","build\/pack-js.php":"65ec729548e3e00ba24c46f498be8191","build\/compile-smarty.php":"c05973fa544f308b039c90a22f0845f4","cron\/reseed-auth0.php":"ba4e0009ef6f884ec2271b096b92ac61","cron\/reseed-roles-auth0.php":"d82b1a580e3cafe45cac081c5cf849ac","cron\/reseed-db.php":"c38e3ba6ef27dcdd953847f24a4542dc","cron\/dailyroutine.php":"22af15385322a9de15fc7d29dde054b3"}} \ No newline at end of file diff --git a/.php_cs.cache b/.php_cs.cache new file mode 100644 index 00000000..60096101 --- /dev/null +++ b/.php_cs.cache @@ -0,0 +1 @@ +{"php":"8.1.13","version":"2.19.3:v2.19.3#75ac86f33fab4714ea5a39a396784d83ae3b5ed8","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true},"hashes":{"index.php":1611584145,"build.php":439301503,"ajax.php":1987824403,"include\/cms_users_edit.php":2755343810,"include\/cms_users_page.php":3078103320,"include\/sizes_edit.php":170682164,"include\/organisations.php":3934082260,"include\/libraryhistory.php":1115001705,"include\/stock_confirm.php":3002484522,"include\/check_out.php":1950877715,"include\/sales_list.php":2733456010,"include\/people_photo.php":3561522056,"include\/cms_functions_edit.php":1905688730,"include\/library_inventory_edit.php":1158203485,"include\/cms_translate_edit.php":941929943,"include\/printed_list_people.php":2556093094,"include\/cms_settings.php":1845188784,"include\/give.php":1202454933,"include\/products_edit.php":489722707,"include\/laundry_edit.php":1526480367,"include\/price_list.php":3933634000,"include\/cms_users_expired.php":3109653694,"include\/stock.php":3139889724,"include\/cms_profile.php":298245782,"include\/stock_export.php":1835072079,"include\/cms_users_handle_ajax_operations.php":774907569,"include\/people_deactivated.php":2113187845,"include\/downloads.php":1806725093,"include\/library_edit.php":445399565,"include\/locations.php":772921431,"include\/printed_list_people_oud.php":2459662822,"include\/library.php":3146962240,"include\/laundry_startcycle.php":132863026,"include\/people_add.php":2586654119,"include\/stock_overview_edit.php":1851679153,"include\/cms_usergroups_edit.php":1818468700,"include\/stock_edit.php":3278734051,"include\/products_export.php":2519404595,"include\/stock_overview.php":4141478567,"include\/container-stock.php":3030560346,"include\/library_inventory.php":1716312904,"include\/camps.php":4082644224,"include\/food_lists.php":1217819232,"include\/people_export.php":2061071514,"include\/give2all.php":167200387,"include\/laundry.php":3863210290,"include\/borrowhistory.php":1532248849,"include\/borrow_edit.php":2719878525,"include\/borrowedititem.php":952120968,"include\/tags.php":690874664,"include\/camps_edit.php":61799215,"include\/exitloginas.php":815804432,"include\/cms_users.php":3480411683,"include\/cms_translate.php":3722628573,"include\/cms_usergroups.php":1060637257,"include\/qr.php":2708439878,"include\/sales_list_export.php":2903249363,"include\/products.php":3338420872,"include\/laundry_noshow.php":745769824,"include\/cms_users_deactivated.php":2505460992,"include\/people_edit.php":1312497615,"include\/borrow.php":499090557,"include\/fancygraphs.php":1125760468,"include\/container-stock_edit.php":957123978,"include\/cms_settings_edit.php":4061289289,"include\/cms_functions.php":4100992113,"include\/sizes.php":3437541381,"include\/market_schedule.php":4118315106,"include\/vegetables.php":1596258334,"include\/locations_edit.php":3026611369,"include\/start.php":1605979129,"include\/people.php":1525694029,"include\/tags_edit.php":399545395,"include\/organisations_edit.php":4110974834,"cypress-session.php":3052792521,"pdf\/pdf-card.php":251557684,"pdf\/idcard.php":2213244639,"pdf\/dryfood.php":1840844934,"pdf\/workshopcard.php":2047132421,"pdf\/occcard.php":1250882095,"pdf\/bicyclecard.php":4103771083,"pdf\/qr.php":2564656864,"pdf\/pdf.php":3255717410,"pdf\/fpdf.php":3999799076,"pdf\/fonts\/OpenSans-Regular.php":1387100355,"pdf\/fonts\/helveticab.php":3617740641,"pdf\/fonts\/OpenSans-BoldItalic.php":2762582721,"pdf\/fonts\/helveticabi.php":1962237037,"pdf\/fonts\/OpenSans-Bold.php":3090472604,"pdf\/fonts\/OpenSans-Italic.php":1669898433,"pdf\/fonts\/helvetica.php":315091496,"pdf\/fonts\/helveticai.php":842627836,"library\/functions.php":1373244479,"library\/gcloud.php":896639199,"library\/config.php":1805532447,"library\/error-reporting.php":2298939625,"library\/constants.php":3513075857,"library\/lib\/loginNotifications.php":3000739621,"library\/lib\/errorhandling.php":3227035067,"library\/lib\/mail.php":3017035794,"library\/lib\/database.php":2213674239,"library\/lib\/session.php":2501077448,"library\/lib\/translate.php":1775557144,"library\/lib\/tools.php":1196929853,"library\/lib\/csvexport.php":2606952619,"library\/lib\/list.php":2717275603,"library\/lib\/formhandler.php":537501142,"library\/lib\/smarty.php":2293264594,"library\/lib\/auth0.php":339212395,"library\/lib\/form.php":3663512483,"library\/core.php":4062009106,"library\/ajax\/checkconnection.php":2829043822,"library\/ajax\/checkusersmenu.php":1412308190,"library\/ajax\/checktag.php":1975862772,"library\/ajax\/checkout.php":3113513100,"library\/ajax\/history.php":1716828443,"library\/ajax\/laundry.php":3276293907,"library\/ajax\/testdbdelete.php":756005152,"library\/ajax\/getsizes.php":3519708634,"library\/ajax\/deleteprofile.php":2533882383,"library\/ajax\/testauth0user.php":2245055750,"library\/ajax\/getproductvalue.php":471706149,"gcloud-entry.php":2138470965,"fake-error.php":1154330550,"mobile\/saveassignbox.php":3788262682,"mobile\/findbox.php":798410399,"mobile\/move.php":3027529769,"mobile\/editbox.php":1290150585,"mobile\/newbox.php":1543573806,"mobile\/changeamount.php":157843467,"mobile\/vieworders.php":1677133074,"mobile\/saveamount.php":2568294108,"mobile\/savebox.php":3157784365,"mobile\/barcode.php":1120610869,"mobile\/assignbox.php":3781059059,"mobile\/selectorganisation.php":1883160496,"mobile\/start.php":2011840417,"mobile.php":1636127788,"db\/migrations\/20210823064211_make_cms_users_id_unsigned.php":1570825843,"db\/migrations\/20220722085453_dirstro_events_table.php":3210796273,"db\/migrations\/20191105181704_add_unique_constraint_qr_code_legacy.php":2658378860,"db\/migrations\/20220515130043_rename_people_idto_object_idin_tags_relations.php":4151494876,"db\/migrations\/20200202170149_set_visible_default_to_one_in_locations_table.php":623540014,"db\/migrations\/20190912133947_foreign_key_camps.php":2594014028,"db\/migrations\/20190923140058_foreign_key_locations.php":1888768824,"db\/migrations\/20201213100955_update_delete_constraint_for_tags.php":1271378129,"db\/migrations\/20190925135319_foreign_keys_library_tables.php":1543462644,"db\/migrations\/20220723060012_dirstro_events_unboxed_item_collections.php":3419017542,"db\/migrations\/20220605074623_make_product_sizegroup_id_not_nullable.php":2465419270,"db\/migrations\/20191202131340_adult_age_in_camps_table_not_null.php":2157585719,"db\/migrations\/20191019135153_change_fk_in_sizes_to_sizegroup.php":3623536441,"db\/migrations\/20220701094153_add_shipment_detail_table.php":130323627,"db\/migrations\/20190703090715_add_parent_id_in_product_categories.php":566936819,"db\/migrations\/20191001093637_foreign_key_people_id.php":3963704218,"db\/migrations\/20190721142832_add_signature_date_in_people.php":3855102369,"db\/migrations\/20190621183422_add_currency_name.php":2927936586,"db\/migrations\/20190610113824_initial_schema.php":936716246,"db\/migrations\/20200706220401_drop_organisation_id_from_cms_users.php":1199706058,"db\/migrations\/20190725174628_add_resettokens_column_to_bases.php":549113197,"db\/migrations\/20220701094148_add_shipment_table.php":3387659244,"db\/migrations\/20190623073649_make_organisation_in_cms_users_foreign_key.php":3123974099,"db\/migrations\/20220605064603_add_product_category_id_foreign_key.php":3231845789,"db\/migrations\/20200706225754_add_composite_unique_index_for_cross_reference_tables.php":2553895515,"db\/migrations\/20200313200406_remove_needed_items.php":316860497,"db\/migrations\/20191013180000_itemsout_nullable.php":2809417305,"db\/migrations\/20190612100627_add_station_to_laundry.php":630871444,"db\/migrations\/20220604185546_remove_portion_column_in_sizes.php":3404898057,"db\/migrations\/20200608185725_add_box_state.php":679118089,"db\/migrations\/20191211131857_make_people_id_in_transaction_table_nullable.php":3329127877,"db\/migrations\/20191021155925_add_fk_for_location_in_stock_table.php":636391107,"db\/migrations\/20220822183629_add_flow_direction.php":2882041663,"db\/migrations\/20210823070448_make_tag_id_unsigned.php":3134105588,"db\/migrations\/20220604184037_make_label_fields_not_nullable.php":2356467911,"db\/migrations\/20220701094045_add_transfer_agreement_table.php":71077700,"db\/migrations\/20220822175013_add_distro_event_tracking_group_id_column.php":3751198611,"db\/migrations\/20210823064828_make_gender_id_unsigned.php":1135418066,"db\/migrations\/20190923101044_foreign_keys_users.php":776872632,"db\/migrations\/20191005183100_foreign_key_remainder.php":3728839847,"db\/migrations\/20200203194629_make_user_id_nullable_in_history_table.php":136487971,"db\/migrations\/20220605061343_drop_product_category_id_foreign_key.php":874513478,"db\/migrations\/20220205073523_add_action_permissions_to_cms_functions.php":2023775355,"db\/migrations\/20191028074813_add_legacy_column_to_qr_table.php":2201915459,"db\/migrations\/20200206100256_add_is_scrap_flag_to_locations_table.php":4039753690,"db\/migrations\/20190703153854_allow_null_for_product_deleted_table.php":1192277270,"db\/migrations\/20190923105735_foreign_keys_language.php":3854558285,"db\/migrations\/20220515130202_add_object_type_in_tags_relations.php":2877247360,"db\/migrations\/20191001141152_foreign_key_sizes.php":4260308221,"db\/migrations\/20191019131459_change_cross_reference_delete_rule_to_cascade.php":4071001607,"db\/migrations\/20220605084444_create_composte_index_on_history_table.php":3945596615,"db\/migrations\/20190925105800_foreign_key_laundry_tables.php":883030129,"db\/migrations\/20220605075402_make_product_camp_id_not_nullable.php":324164983,"db\/migrations\/20220604165328_remove_underscore_columns.php":2148197044,"db\/migrations\/20190701120113_fix_usergroups_foreign_key.php":504355617,"db\/migrations\/20220602091709_add_seq_to_tags.php":4156736457,"db\/migrations\/20190623123844_add_foreign_keys_in_user_mgmt.php":1672187917,"db\/migrations\/20190930225021_foreign_key_qr.php":2409950935,"db\/migrations\/20220822191744_rename_distro_events_outflow_logs.php":3305293207,"db\/migrations\/20220604182719_make_items_in_stock_nullable.php":194597125,"db\/migrations\/20190613224510_usergroups_levels.php":1136812791,"db\/migrations\/20220513080431_add_type_to_tags.php":3242045660,"db\/migrations\/20210314130614_unique_constraint_qr_id_in_stock_table.php":4116395157,"db\/migrations\/20190703082355_add_product_foreign_keys.php":2672831457,"db\/migrations\/20210823063551_make_cms_functions_id_unsigned.php":4074203232,"db\/migrations\/20210823070205_make_size_id_unsigned.php":335118334,"db\/migrations\/20220723064611_add_distro_events_to_stock.php":3678316679,"db\/migrations\/20220604164558_make_comment_fields_nullable.php":2972121150,"db\/migrations\/20210822075141_make_box_state_id_unsigned.php":3239588825,"db\/migrations\/20220605074638_add_product_sizegroup_id_foreign_key.php":2265664489,"db\/migrations\/20190613211018_new_user_mgmt.php":913677027,"db\/migrations\/20220822172951_distro_events_tracking_groups.php":3028743556,"db\/migrations\/20220723063203_add_distro_events_columns_to_locations.php":1610910450,"db\/migrations\/20191024152307_add_missing_fks.php":1375127678,"db\/migrations\/20210823070632_make_transaction_id_unsigned.php":540471474,"db\/migrations\/20200824185532_create_people_tag_cross_reference.php":862781590,"db\/migrations\/20220701094049_add_transfer_agreement_detail_table.php":2663553891,"db\/migrations\/20190703145717_clean_up_products_table.php":3422322940,"db\/migrations\/20220605081726_drop_product_amountneeded_column.php":1458697845,"db\/migrations\/20220822191943_add_distro_event_tracking_group_id_foreign_key.php":783263583,"db\/migrations\/20191105181657_add_unique_constraint_stock_boxid.php":1016325404,"db\/migrations\/20220605075347_drop_product_camp_id_foreign_key.php":1975487739,"db\/migrations\/20220822182632_drop_distro_event_id_foreign_key.php":2647542846,"db\/migrations\/20190622184117_add_organization_ids_to_cms_users_table.php":900699486,"db\/migrations\/20190623140300_add_deleted_column_to_organisations.php":1431972350,"db\/migrations\/20191027225630_add_deleted_column_to_locations.php":175718580,"db\/migrations\/20220723052618_dirstro_events_packing_list_entries.php":1747560662,"db\/migrations\/schema.php":1312806946,"db\/migrations\/20220205084503_add_cms_user_groups_roles.php":2872690713,"db\/migrations\/20220605075413_add_product_camp_id_foreign_key.php":3704324266,"db\/migrations\/20210823065128_make_location_id_unsigned.php":1655779809,"db\/migrations\/20210823065917_make_product_id_unsigned.php":2103701633,"db\/migrations\/20190616152410_after_rotterdam_sprint.php":3406119954,"db\/migrations\/20220605064416_make_product_category_id_not_nullable.php":3961520852,"db\/migrations\/20220513124241_alter_people_tags_to_tags_relations.php":1245118699,"db\/migrations\/20191202135024_user_id_in_transactions_nullable.php":3745728764,"db\/migrations\/20190924152152_users_created_modified.php":1251746086,"db\/migrations\/20191001145902_foreign_key_product.php":168020102,"db\/migrations\/20210130175622_add_settings_for_bases.php":2845632372,"db\/migrations\/20210823065359_make_people_id_unsigned.php":896509850,"db\/migrations\/20200923172713_add_tag_description.php":723682490,"db\/migrations\/20190927155724_foreign_key_borrow_tables.php":2619756246,"db\/migrations\/20190614143640_add_organisation_column.php":1117313692,"db\/migrations\/20191019134931_change_fk_in_products_to_camps.php":1122730554,"db\/migrations\/20191023152307_change_collation_and_encoding_to_utf8.php":158149719,"db\/migrations\/20191005183200_foreign_key_cmsfunctions.php":1053932538,"db\/migrations\/20190623100406_add_deleted_column_to_usergroups.php":1305567125,"db\/migrations\/20200824171337_add_tag_table.php":4126316136,"db\/migrations\/20220605074604_drop_product_sizegroup_id_foreign_key.php":2250072532,"db\/migrations\/20220723061731_dirstro_events_outflow_logs.php":2826153876,"db\/seeds\/ActionPermissions.php":3680892294,"db\/seeds\/Demo.php":786032162,"db\/seeds\/Cypress.php":358933697,"db\/seeds\/ClearDb.php":1287772410,"db\/seeds\/DemoUsers.php":2808328426,"db\/seeds\/Minimal.php":3402419281,"templates\/templates_c\/a9fb274994b13233b9f7b1b6679509b0159ffd16_3.file.cms_error.tpl.php":2609297738,"templates\/templates_c\/f557abdc2782601b4ead697e334efe54b9e0350f_3.file.cms_index.tpl.php":900723381,"templates\/templates_c\/8521a60ec97f4a1bd777017e2875965655bed61c_3.file.start-market.tpl.php":3304082740,"build\/jsmin-1.1.1.php":185195618,"build\/pack-css.php":3430214670,"build\/pack-js.php":2392791340,"build\/compile-smarty.php":829675069,"cron\/reseed-auth0.php":2646110689,"cron\/reseed-roles-auth0.php":1883407739,"cron\/reseed-db.php":3313190927,"cron\/dailyroutine.php":2490402586}} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 97508461..f8250bab 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,7 +6,7 @@ "recommendations": [ "xdebug.php-debug", "bmewburn.vscode-intelephense-client", - "fterrag.vscode-php-cs-fixer" + "junstyle.php-cs-fixer" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [ diff --git a/.vscode/launch.json b/.vscode/launch.json index 667ffd76..06c4522a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,14 +4,14 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { "name": "Listen for XDebug", "type": "php", "request": "launch", "port": 9003, "pathMappings": { - "/var/www/html": "${workspaceFolder}"}, + "/var/www/html": "${workspaceFolder}" + }, "log": true }, { diff --git a/.vscode/settings.json b/.vscode/settings.json index 4798d260..107eaefa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "[php]": { "editor.formatOnSave": true, - "editor.defaultFormatter": "fterrag.vscode-php-cs-fixer" + "editor.defaultFormatter": "junstyle.php-cs-fixer" }, "php-cs-fixer.rules": "@PhpCsFixer", "intelephense.format.enable": false diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c5ab8b59 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,96 @@ +FROM php:7.4.25-apache AS base +WORKDIR /var/www/html + +# install needed libraries +RUN apt-get update \ + && apt-get -y --no-install-recommends install libfontconfig1 libxrender1 libxext6 zlib1g-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN a2enmod rewrite + +RUN docker-php-ext-install \ + gd \ + pdo_mysql \ + exif + +# op cache +RUN docker-php-ext-install -j "$(nproc)" opcache + +RUN set -ex; \ + { \ + echo "; Cloud Run enforces memory & timeouts"; \ + echo "memory_limit = -1"; \ + echo "max_execution_time = 0"; \ + echo "; File upload at Cloud Run network limit"; \ + echo "upload_max_filesize = 32M"; \ + echo "post_max_size = 32M"; \ + echo "; Configure Opcache for Containers"; \ + echo "opcache.enable = On"; \ + echo "opcache.validate_timestamps = Off"; \ + echo "; Configure Opcache Memory (Application-specific)"; \ + echo "opcache.memory_consumption = 32"; \ + } > "$PHP_INI_DIR/conf.d/cloud-run.ini" + +RUN pecl install opencensus-alpha + +# Use the PORT environment variable in Apache configuration files. +# https://cloud.google.com/run/docs/reference/container-contract#port +RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf + +FROM base AS debug + +# RUN enable-xdebug in PHP 8 env +RUN pecl install xdebug && docker-php-ext-enable xdebug +# Configure PHP for development. +# https://github.com/docker-library/docs/blob/master/php/README.md#configuration +RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" + +FROM composer:2.1.11 AS build + +WORKDIR /var/www/html +# ensures we use docker cache and only rebuild composer +# if the dependencies have changed +COPY composer.json . +COPY composer.lock . +RUN composer install --no-dev --no-scripts --ignore-platform-reqs +COPY . . +RUN composer dump-autoload --optimize +RUN ls +RUN php build/build.php +RUN rm -r build/ + +FROM base AS final + +# Configure PHP for production. +# https://github.com/docker-library/docs/blob/master/php/README.md#configuration +RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" + +COPY --from=build /var/www/html /var/www/html + + + +# docker pull myimage:latest-build | true +# docker pull myimage:latest | true + +# docker build . --target=build --cache-from=myimage:latest-build -t myimage:latest-build +# docker build . --cache-from=myimage:latest-build --cache-from=myimage:latest -t myimage:latest + +# docker push myimage:latest-build +# docker push myimage:latest + + +# use docker build from circleci and then push to gcloud run +# gcloud auth configure-docker +# docker tag dropapp europe-west1-docker.pkg.dev/dropapp-242214/cloudrun/dropapp +# docker push europe-west1-docker.pkg.dev/dropapp-242214/cloudrun/dropapp +# gcloud run deploy + +# gcloud config set builds/use_kaniko True +# docker build -t dropapp . && docker run -e PORT=8080 -p 81:8080 dropapp +# use cloud build as (a) we only have 1gb free data transfer from circleci +# and (b) cloud build offers 120 mins free per day + +# gcloud run deploy dropapp-test --source . --project dropapp-242214 --add-cloudsql-instances=dropapp-242214:europe-west1:boxtribute-production + +# docker run -it dropapp sh \ No newline at end of file diff --git a/README.md b/README.md index c94cfa85..addd764f 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,6 @@ If you are interested in being part of this project, write us at [jointheteam@bo docker-compose up - Alternatively, you can run using the PHP development server - - GOOGLE_CLOUD_PROJECT=xxx php -S localhost:8000 gcloud-entry.php - 5. To initialize the database for the first time, you should run: vendor/bin/phinx migrate -e development diff --git a/build.php b/build/build.php similarity index 100% rename from build.php rename to build/build.php diff --git a/build/compile-smarty.php b/build/compile-smarty.php index e3979ece..aa531909 100644 --- a/build/compile-smarty.php +++ b/build/compile-smarty.php @@ -3,72 +3,12 @@ require_once __DIR__.'/../vendor/autoload.php'; require_once __DIR__.'/../library/lib/smarty.php'; -// You can’t precompile Smarty on one system and then upload to another server, -// as the compiled filenames have the absolute path of the source files encoded. -// /srv is the root path on google app engine -$deploymentRootFolder = '/workspace'; - -// So, this is a cheeky work-around that rewrites the hashes -// in the templates and on the file system so they will match -// the paths of the target deployment system - -// The hash was reverse engineered from smarty_internal_resource_file.php $smarty = new Zmarty(); precompileTemplates($smarty); -rewriteAllTemplateHashes($smarty, $deploymentRootFolder); function precompileTemplates($smarty) { $smarty->clearCompiledTemplate(); $smarty->compileAllTemplates('.tpl', true, 0, null); } - -function rewriteAllTemplateHashes($smarty, $deploymentRootFolder) -{ - $rootDir = realpath(__DIR__.'/../'); - $originalTemplateDir = $smarty->getTemplateDir()[0]; - // swap out the root of originalTemplateDir for the new deployment path - $deployedTemplateDir = $deploymentRootFolder.str_replace($rootDir, '', $originalTemplateDir); - echo "Re-mapping templates from '{$originalTemplateDir}' to '{$deployedTemplateDir}'\n"; - - $it = new FilesystemIterator($smarty->getCompileDir(), ); - foreach (glob($smarty->getCompileDir().'*.tpl.php') as $fileName) { - rewriteTemplateHash($smarty, $fileName, $originalTemplateDir, $deployedTemplateDir); - } -} - -function rewriteTemplateHash($smarty, $templateFileName, $originalTemplateDir, $deployedTemplateDir) -{ - // example file name format: - // 5ad5ecef0cb555f346e97a65e3cc109456de7a1a_1.file.mobile_scan.tpl.php - echo "Processing compiled template {$templateFileName}\n"; - $fileNameParts = explode('.', basename($templateFileName)); - $originalTemplateHash = $fileNameParts[0]; - $originalTemplateName = $fileNameParts[2].'.'.$fileNameParts[3]; - $originalTemplatePath = $originalTemplateDir.$originalTemplateName; - // work out what we expect the current hash to be, to ensure it matches - // if not, the algorithm has somehow changed, so we'll abort - $computedHashInput = $originalTemplatePath.$originalTemplateDir; - $computedHash = sha1($computedHashInput); - // the _0/_1/_3 suffix on the first component of the file name appears to - // vary based on Smarty configuration. We just extract it from the existing - // file name to save us working that bit out - $computedHashWithSuffix = $computedHash.'_'.explode('_', $originalTemplateHash)[1]; - if ($computedHashWithSuffix != $originalTemplateHash) { - throw new Exception("Failed to anticipate current hash for {$templateFileName}\nHashed input: {$computedHashInput}\nCalculated hash: {$computedHashWithSuffix}\nActual hash: {$originalTemplateHash}"); - } - $newTemplatePath = $deployedTemplateDir.$originalTemplateName; - // we want to - // (a) replace the old file name and hash within the contents of the file - // with the new hash - // (b) rename the template so it uses the new hash - $newHash = sha1($newTemplatePath.$deployedTemplateDir); - $currentTemplate = file_get_contents($templateFileName); - $newTemplate = str_replace($computedHash, $newHash, $currentTemplate); - $newTemplate = str_replace($originalTemplatePath, $newTemplatePath, $newTemplate); - $newTemplateCompiledPath = str_replace($computedHash, $newHash, $templateFileName); - echo "Saving new template to {$newTemplateCompiledPath} and deleting the original\n"; - file_put_contents($newTemplateCompiledPath, $newTemplate); - unlink($templateFileName); -} diff --git a/build/jsmin-1.1.1.php b/build/jsmin-1.1.1.php index 0d65c87f..88974e9c 100644 --- a/build/jsmin-1.1.1.php +++ b/build/jsmin-1.1.1.php @@ -35,65 +35,65 @@ public static function minify($js) protected function action($d) { switch ($d) { - case 1: - $this->output .= $this->a; - - // no break - case 2: - $this->a = $this->b; - - if ("'" === $this->a || '"' === $this->a) { - while (true) { + case 1: $this->output .= $this->a; - $this->a = $this->get(); - - if ($this->a === $this->b) { - break; - } - if (ord($this->a) <= self::ORD_LF) { - throw new JSMinException('Unterminated string literal.'); - } - - if ('\\' === $this->a) { - $this->output .= $this->a; - $this->a = $this->get(); - } - } - } + // no break + case 2: + $this->a = $this->b; - // no break - case 3: - $this->b = $this->next(); + if ("'" === $this->a || '"' === $this->a) { + while (true) { + $this->output .= $this->a; + $this->a = $this->get(); - if ('/' === $this->b && ( - '(' === $this->a || ',' === $this->a || '=' === $this->a - || ':' === $this->a || '[' === $this->a || '!' === $this->a - || '&' === $this->a || '|' === $this->a || '?' === $this->a - )) { - $this->output .= $this->a.$this->b; + if ($this->a === $this->b) { + break; + } - while (true) { - $this->a = $this->get(); + if (ord($this->a) <= self::ORD_LF) { + throw new JSMinException('Unterminated string literal.'); + } - if ('/' === $this->a) { - break; + if ('\\' === $this->a) { + $this->output .= $this->a; + $this->a = $this->get(); + } + } } - if ('\\' === $this->a) { - $this->output .= $this->a; - $this->a = $this->get(); - } elseif (ord($this->a) <= self::ORD_LF) { - throw new JSMinException('Unterminated regular expression '. + + // no break + case 3: + $this->b = $this->next(); + + if ('/' === $this->b && ( + '(' === $this->a || ',' === $this->a || '=' === $this->a + || ':' === $this->a || '[' === $this->a || '!' === $this->a + || '&' === $this->a || '|' === $this->a || '?' === $this->a + )) { + $this->output .= $this->a.$this->b; + + while (true) { + $this->a = $this->get(); + + if ('/' === $this->a) { + break; + } + if ('\\' === $this->a) { + $this->output .= $this->a; + $this->a = $this->get(); + } elseif (ord($this->a) <= self::ORD_LF) { + throw new JSMinException('Unterminated regular expression '. 'literal.'); - } + } - $this->output .= $this->a; - } + $this->output .= $this->a; + } - $this->b = $this->next(); + $this->b = $this->next(); + } } } - } protected function get() { @@ -132,83 +132,83 @@ protected function min() while (null !== $this->a) { switch ($this->a) { - case ' ': - if ($this->isAlphaNum($this->b)) { - $this->action(1); - } else { - $this->action(2); - } - - break; - - case "\n": - switch ($this->b) { - case '{': - case '[': - case '(': - case '+': - case '-': - $this->action(1); - - break; - - case ' ': - $this->action(3); - - break; - - default: - if ($this->isAlphaNum($this->b)) { - $this->action(1); - } else { - $this->action(2); - } - } - - break; - - default: - switch ($this->b) { - case ' ': - if ($this->isAlphaNum($this->a)) { - $this->action(1); - - break; - } - - $this->action(3); - - break; - - case "\n": - switch ($this->a) { - case '}': - case ']': - case ')': - case '+': - case '-': - case '"': - case "'": - $this->action(1); - - break; + case ' ': + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } else { + $this->action(2); + } - default: - if ($this->isAlphaNum($this->a)) { - $this->action(1); - } else { - $this->action(3); - } - } + break; - break; + case "\n": + switch ($this->b) { + case '{': + case '[': + case '(': + case '+': + case '-': + $this->action(1); - default: - $this->action(1); + break; - break; - } - } + case ' ': + $this->action(3); + + break; + + default: + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } else { + $this->action(2); + } + } + + break; + + default: + switch ($this->b) { + case ' ': + if ($this->isAlphaNum($this->a)) { + $this->action(1); + + break; + } + + $this->action(3); + + break; + + case "\n": + switch ($this->a) { + case '}': + case ']': + case ')': + case '+': + case '-': + case '"': + case "'": + $this->action(1); + + break; + + default: + if ($this->isAlphaNum($this->a)) { + $this->action(1); + } else { + $this->action(3); + } + } + + break; + + default: + $this->action(1); + + break; + } + } } return $this->output; @@ -220,39 +220,39 @@ protected function next() if ('/' === $c) { switch ($this->peek()) { - case '/': - while (true) { - $c = $this->get(); - - if (ord($c) <= self::ORD_LF) { - return $c; - } - } + case '/': + while (true) { + $c = $this->get(); - // no break - case '*': - $this->get(); + if (ord($c) <= self::ORD_LF) { + return $c; + } + } - while (true) { - switch ($this->get()) { - case '*': - if ('/' === $this->peek()) { + // no break + case '*': $this->get(); - return ' '; - } + while (true) { + switch ($this->get()) { + case '*': + if ('/' === $this->peek()) { + $this->get(); - break; + return ' '; + } - case null: - throw new JSMinException('Unterminated comment.'); - } - } + break; - // no break - default: - return $c; - } + case null: + throw new JSMinException('Unterminated comment.'); + } + } + + // no break + default: + return $c; + } } return $c; diff --git a/composer.json b/composer.json index c8e34e9a..d3874b45 100644 --- a/composer.json +++ b/composer.json @@ -5,21 +5,22 @@ } }, "require-dev": { - "odan/phinx-migrations-generator": "^4.3.0", - "phan/phan": "^2.2", - "friendsofphp/php-cs-fixer": "^2.15", - "jakub-onderka/php-parallel-lint": "^1.0" + "odan/phinx-migrations-generator": "^5.6.0", + "phan/phan": "^5.4", + "friendsofphp/php-cs-fixer": "^3.13", + "php-parallel-lint/php-parallel-lint": "^1.0" }, "require": { - "robmorgan/phinx": "^0.11.1", + "robmorgan/phinx": "^0.12", + "symfony/yaml": "^5.0", "google/cloud-storage": "^1.12", "opencensus/opencensus-exporter-stackdriver": "^0.1.0", - "smarty/smarty": "^3.1", - "sendgrid/sendgrid": "^7.3", + "smarty/smarty": "^4.3", + "sendgrid/sendgrid": "^8.0", "google/cloud-logging": "^1.18", "fzaninotto/faker": "^1.8", "auth0/auth0-php": "^8.0.5", - "opencensus/opencensus": "^0.6.0", + "opencensus/opencensus": "^0.7.0", "kriswallsmith/buzz": "^1.2", "nyholm/psr7": "^1.4", "steampixel/simple-php-router": "^0.7.0", @@ -27,6 +28,7 @@ "endroid/qr-code": "^4.4", "sentry/sentry": "^3.6", "php-http/curl-client": "^2.2", - "google/cloud-error-reporting": "^0.19.5" + "google/cloud-error-reporting": "^0.19.5", + "google/cloud-datastore": "^1.16" } } diff --git a/composer.lock b/composer.lock index 0d5f8108..4e93221e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "87020c0ae69229584ee7f1efb9bbc480", + "content-hash": "8f96a65145d6f7b51c39d68fc7017ab8", "packages": [ { "name": "auth0/auth0-php", - "version": "8.2.1", + "version": "8.3.1", "source": { "type": "git", "url": "https://github.com/auth0/auth0-PHP.git", - "reference": "c6a628f9e3ce30c225ce42ae208ccc32f529f25c" + "reference": "848c702e2ea58c8dba0cae30976953b5772f8bf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/auth0/auth0-PHP/zipball/c6a628f9e3ce30c225ce42ae208ccc32f529f25c", - "reference": "c6a628f9e3ce30c225ce42ae208ccc32f529f25c", + "url": "https://api.github.com/repos/auth0/auth0-PHP/zipball/848c702e2ea58c8dba0cae30976953b5772f8bf0", + "reference": "848c702e2ea58c8dba0cae30976953b5772f8bf0", "shasum": "" }, "require": { @@ -36,20 +36,19 @@ "psr/http-message-implementation": "^1.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.25", - "firebase/php-jwt": "^6.0", + "firebase/php-jwt": "^6.2", "hyperf/event": "^2.2", "mockery/mockery": "^1.4", - "nunomaduro/phpinsights": "^2.0", - "nyholm/psr7": "^1.4", + "nyholm/psr7": "^1.5", "pestphp/pest": "^1.21", - "php-http/mock-client": "^1.4", - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-strict-rules": "^1.1", + "php-http/mock-client": "^1.5", + "phpstan/phpstan": "^1.7", + "phpstan/phpstan-strict-rules": "1.4.3", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.12.23", - "symfony/cache": "^4.4 || ^5.2 || ^6.0", - "vimeo/psalm": "^4.10", + "rector/rector": "^0.13.6", + "squizlabs/php_codesniffer": "^3.7", + "symfony/cache": "^4.4 || ^5.4 || ^6.1", + "vimeo/psalm": "^4.24", "wikimedia/composer-merge-plugin": "^2.0" }, "type": "library", @@ -89,9 +88,9 @@ ], "support": { "issues": "https://github.com/auth0/auth0-PHP/issues", - "source": "https://github.com/auth0/auth0-PHP/tree/8.2.1" + "source": "https://github.com/auth0/auth0-PHP/tree/8.3.1" }, - "time": "2022-06-07T14:13:17+00:00" + "time": "2022-09-26T09:34:14+00:00" }, { "name": "bacon/bacon-qr-code", @@ -147,6 +146,66 @@ }, "time": "2022-03-14T02:02:36+00:00" }, + { + "name": "brick/math", + "version": "0.9.3", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.9.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.9.3" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2021-08-15T20:50:18+00:00" + }, { "name": "cache/adapter-common", "version": "1.3.0", @@ -270,129 +329,28 @@ }, "time": "2021-12-31T10:03:23+00:00" }, - { - "name": "cakephp/cache", - "version": "3.10.4", - "source": { - "type": "git", - "url": "https://github.com/cakephp/cache.git", - "reference": "0e95a17b118d900f362de07bff902fa147e51fb2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/cache/zipball/0e95a17b118d900f362de07bff902fa147e51fb2", - "reference": "0e95a17b118d900f362de07bff902fa147e51fb2", - "shasum": "" - }, - "require": { - "cakephp/core": "^3.6.0", - "php": ">=5.6.0,<8.0.0", - "psr/simple-cache": "^1.0.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cake\\Cache\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/cache/graphs/contributors" - } - ], - "description": "Easy to use Caching library with support for multiple caching backends", - "homepage": "https://cakephp.org", - "keywords": [ - "cache", - "caching", - "cakephp" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp/issues", - "source": "https://github.com/cakephp/cache" - }, - "time": "2021-06-20T01:13:19+00:00" - }, - { - "name": "cakephp/collection", - "version": "3.10.4", - "source": { - "type": "git", - "url": "https://github.com/cakephp/collection.git", - "reference": "5667e755cfafe4b186f5f2a54121cf44cb86159e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/collection/zipball/5667e755cfafe4b186f5f2a54121cf44cb86159e", - "reference": "5667e755cfafe4b186f5f2a54121cf44cb86159e", - "shasum": "" - }, - "require": { - "php": ">=5.6.0,<8.0.0" - }, - "type": "library", - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Cake\\Collection\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/collection/graphs/contributors" - } - ], - "description": "Work easily with arrays and iterators by having a battery of utility traversal methods", - "homepage": "https://cakephp.org", - "keywords": [ - "arrays", - "cakephp", - "collections", - "iterators" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp/issues", - "source": "https://github.com/cakephp/collection" - }, - "time": "2021-03-26T00:40:07+00:00" - }, { "name": "cakephp/core", - "version": "3.10.4", + "version": "4.4.7", "source": { "type": "git", "url": "https://github.com/cakephp/core.git", - "reference": "716300a55ac86b7456e52258d3f50545545d2d6b" + "reference": "20e50de2f461b5983a1a1296fe5c3762857b9edd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/core/zipball/716300a55ac86b7456e52258d3f50545545d2d6b", - "reference": "716300a55ac86b7456e52258d3f50545545d2d6b", + "url": "https://api.github.com/repos/cakephp/core/zipball/20e50de2f461b5983a1a1296fe5c3762857b9edd", + "reference": "20e50de2f461b5983a1a1296fe5c3762857b9edd", "shasum": "" }, "require": { - "cakephp/utility": "^3.6.0", - "php": ">=5.6.0,<8.0.0" + "cakephp/utility": "^4.0", + "php": ">=7.4.0" }, "suggest": { "cakephp/cache": "To use Configure::store() and restore().", - "cakephp/event": "To use PluginApplicationInterface or plugin applications." + "cakephp/event": "To use PluginApplicationInterface or plugin applications.", + "league/container": "To use Container and ServiceProvider classes" }, "type": "library", "autoload": { @@ -426,28 +384,30 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/core" }, - "time": "2021-06-18T07:33:08+00:00" + "time": "2022-10-07T16:40:13+00:00" }, { "name": "cakephp/database", - "version": "3.10.4", + "version": "4.4.7", "source": { "type": "git", "url": "https://github.com/cakephp/database.git", - "reference": "e16dae97cfe00b1de9c210bd49f71ad5c2de199a" + "reference": "76ae94d2e405c2a7aef5a6a2e9aba44190048ae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/database/zipball/e16dae97cfe00b1de9c210bd49f71ad5c2de199a", - "reference": "e16dae97cfe00b1de9c210bd49f71ad5c2de199a", + "url": "https://api.github.com/repos/cakephp/database/zipball/76ae94d2e405c2a7aef5a6a2e9aba44190048ae7", + "reference": "76ae94d2e405c2a7aef5a6a2e9aba44190048ae7", "shasum": "" }, "require": { - "cakephp/cache": "^3.6.0", - "cakephp/core": "^3.6.0", - "cakephp/datasource": "^3.6.0", - "cakephp/log": "^3.6.0", - "php": ">=5.6.0,<8.0.0" + "cakephp/core": "^4.0", + "cakephp/datasource": "^4.0", + "php": ">=7.4.0" + }, + "suggest": { + "cakephp/i18n": "If you are using locale-aware datetime formats or Chronos types.", + "cakephp/log": "If you want to use query logging without providing a logger yourself." }, "type": "library", "autoload": { @@ -480,25 +440,27 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/database" }, - "time": "2021-10-23T07:22:45+00:00" + "time": "2022-10-22T12:49:22+00:00" }, { "name": "cakephp/datasource", - "version": "3.10.4", + "version": "4.4.7", "source": { "type": "git", "url": "https://github.com/cakephp/datasource.git", - "reference": "accbe0c85552f384e587d73abdba1618c604b54d" + "reference": "4c95fdf1de61cbc8d8ab4b34643f4acc250fc569" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/datasource/zipball/accbe0c85552f384e587d73abdba1618c604b54d", - "reference": "accbe0c85552f384e587d73abdba1618c604b54d", + "url": "https://api.github.com/repos/cakephp/datasource/zipball/4c95fdf1de61cbc8d8ab4b34643f4acc250fc569", + "reference": "4c95fdf1de61cbc8d8ab4b34643f4acc250fc569", "shasum": "" }, "require": { - "cakephp/core": "^3.6.0", - "php": ">=5.6.0,<8.0.0" + "cakephp/core": "^4.0", + "php": ">=7.4.0", + "psr/log": "^1.0 || ^2.0", + "psr/simple-cache": "^1.0 || ^2.0" }, "suggest": { "cakephp/cache": "If you decide to use Query caching.", @@ -536,76 +498,25 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/datasource" }, - "time": "2021-04-07T13:23:38+00:00" - }, - { - "name": "cakephp/log", - "version": "3.10.4", - "source": { - "type": "git", - "url": "https://github.com/cakephp/log.git", - "reference": "cf10bdcce4e78430a780edb2cc5b4b2b4719a65d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/log/zipball/cf10bdcce4e78430a780edb2cc5b4b2b4719a65d", - "reference": "cf10bdcce4e78430a780edb2cc5b4b2b4719a65d", - "shasum": "" - }, - "require": { - "cakephp/core": "^3.6.0", - "php": ">=5.6.0,<8.0.0", - "psr/log": "^1.0.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cake\\Log\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "CakePHP Community", - "homepage": "https://github.com/cakephp/log/graphs/contributors" - } - ], - "description": "CakePHP logging library with support for multiple different streams", - "homepage": "https://cakephp.org", - "keywords": [ - "Streams", - "cakephp", - "log", - "logging" - ], - "support": { - "forum": "https://stackoverflow.com/tags/cakephp", - "irc": "irc://irc.freenode.org/cakephp", - "issues": "https://github.com/cakephp/cakephp/issues", - "source": "https://github.com/cakephp/log" - }, - "time": "2020-10-28T18:13:14+00:00" + "time": "2022-09-25T07:14:39+00:00" }, { "name": "cakephp/utility", - "version": "3.10.4", + "version": "4.4.7", "source": { "type": "git", "url": "https://github.com/cakephp/utility.git", - "reference": "51b0af31af3239f6141006bbd7cbc7b16aba40d6" + "reference": "a3fb57b8da981bb549ce02c0438ab5743053dd45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/utility/zipball/51b0af31af3239f6141006bbd7cbc7b16aba40d6", - "reference": "51b0af31af3239f6141006bbd7cbc7b16aba40d6", + "url": "https://api.github.com/repos/cakephp/utility/zipball/a3fb57b8da981bb549ce02c0438ab5743053dd45", + "reference": "a3fb57b8da981bb549ce02c0438ab5743053dd45", "shasum": "" }, "require": { - "cakephp/core": "^3.6.0", - "php": ">=5.6.0,<8.0.0" + "cakephp/core": "^4.0", + "php": ">=7.4.0" }, "suggest": { "ext-intl": "To use Text::transliterate() or Text::slug()", @@ -646,7 +557,7 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/utility" }, - "time": "2020-12-09T02:43:02+00:00" + "time": "2022-10-10T18:01:10+00:00" }, { "name": "clue/stream-filter", @@ -763,16 +674,16 @@ }, { "name": "endroid/qr-code", - "version": "4.6.0", + "version": "4.6.1", "source": { "type": "git", "url": "https://github.com/endroid/qr-code.git", - "reference": "b60873b14e2ca7bf3c3746f5e032023095a7e05c" + "reference": "a75c913b0e4d6ad275e49a2c1de1cacffc6c2184" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/b60873b14e2ca7bf3c3746f5e032023095a7e05c", - "reference": "b60873b14e2ca7bf3c3746f5e032023095a7e05c", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/a75c913b0e4d6ad275e49a2c1de1cacffc6c2184", + "reference": "a75c913b0e4d6ad275e49a2c1de1cacffc6c2184", "shasum": "" }, "require": { @@ -823,7 +734,7 @@ ], "support": { "issues": "https://github.com/endroid/qr-code/issues", - "source": "https://github.com/endroid/qr-code/tree/4.6.0" + "source": "https://github.com/endroid/qr-code/tree/4.6.1" }, "funding": [ { @@ -831,20 +742,20 @@ "type": "github" } ], - "time": "2022-10-04T17:13:41+00:00" + "time": "2022-10-26T08:48:17+00:00" }, { "name": "firebase/php-jwt", - "version": "v6.3.0", + "version": "v6.3.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8" + "reference": "ddfaddcb520488b42bca3a75e17e9dd53c3667da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", - "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/ddfaddcb520488b42bca3a75e17e9dd53c3667da", + "reference": "ddfaddcb520488b42bca3a75e17e9dd53c3667da", "shasum": "" }, "require": { @@ -891,9 +802,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.3.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.3.1" }, - "time": "2022-07-15T16:48:45+00:00" + "time": "2022-11-01T21:20:08+00:00" }, { "name": "fzaninotto/faker", @@ -952,16 +863,16 @@ }, { "name": "google/auth", - "version": "v1.21.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-auth-library-php.git", - "reference": "aa3b9ca29258ac6347ce3c8937a2418c5d78f840" + "reference": "1f8cff5aa324700d041efd2df1a0855112a2e7ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/aa3b9ca29258ac6347ce3c8937a2418c5d78f840", - "reference": "aa3b9ca29258ac6347ce3c8937a2418c5d78f840", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/1f8cff5aa324700d041efd2df1a0855112a2e7ae", + "reference": "1f8cff5aa324700d041efd2df1a0855112a2e7ae", "shasum": "" }, "require": { @@ -976,8 +887,8 @@ "guzzlehttp/promises": "0.1.1|^1.3", "kelvinmo/simplejwt": "^0.2.5|^0.5.1", "phpseclib/phpseclib": "^2.0.31", - "phpspec/prophecy-phpunit": "^1.1", - "phpunit/phpunit": "^7.5||^8.5", + "phpspec/prophecy-phpunit": "^1.1||^2.0", + "phpunit/phpunit": "^7.5||^9.0.0", "sebastian/comparator": ">=1.2.3", "squizlabs/php_codesniffer": "^3.5" }, @@ -1004,22 +915,22 @@ "support": { "docs": "https://googleapis.github.io/google-auth-library-php/main/", "issues": "https://github.com/googleapis/google-auth-library-php/issues", - "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.21.1" + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.24.0" }, - "time": "2022-05-16T19:34:15+00:00" + "time": "2022-11-28T18:29:23+00:00" }, { "name": "google/cloud-core", - "version": "v1.47.1", + "version": "v1.47.4", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-core.git", - "reference": "14d856517d18b14754b364896b28210df2738df0" + "reference": "3a00a21e2af5a07a77cd01a7dcbc664d459c8fa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/14d856517d18b14754b364896b28210df2738df0", - "reference": "14d856517d18b14754b364896b28210df2738df0", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/3a00a21e2af5a07a77cd01a7dcbc664d459c8fa2", + "reference": "3a00a21e2af5a07a77cd01a7dcbc664d459c8fa2", "shasum": "" }, "require": { @@ -1034,10 +945,11 @@ }, "require-dev": { "erusev/parsedown": "^1.6", - "google/common-protos": "^1.0||^2.0", + "google/cloud-common-protos": "^0.3", "google/gax": "^1.9", "opis/closure": "^3", "phpdocumentor/reflection": "^3.0||^4.0", + "phpspec/prophecy": "^1.10.3", "phpunit/phpunit": "^4.8|^5.0|^8.0", "squizlabs/php_codesniffer": "2.*", "yoast/phpunit-polyfills": "^1.0" @@ -1069,22 +981,73 @@ ], "description": "Google Cloud PHP shared dependency, providing functionality useful to all components.", "support": { - "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.47.1" + "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.47.4" }, - "time": "2022-08-05T00:41:21+00:00" + "time": "2022-11-01T20:21:07+00:00" + }, + { + "name": "google/cloud-datastore", + "version": "v1.16.4", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-php-datastore.git", + "reference": "afd4042e1f388cf465647e84666585302e650093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-datastore/zipball/afd4042e1f388cf465647e84666585302e650093", + "reference": "afd4042e1f388cf465647e84666585302e650093", + "shasum": "" + }, + "require": { + "google/cloud-core": "^1.43", + "google/gax": "^1.1" + }, + "require-dev": { + "erusev/parsedown": "^1.6", + "phpdocumentor/reflection": "^3.0||^4.0", + "phpspec/prophecy": "^1.10.3", + "phpunit/phpunit": "^4.8|^5.0|^8.0", + "squizlabs/php_codesniffer": "2.*", + "yoast/phpunit-polyfills": "^1.0" + }, + "type": "library", + "extra": { + "component": { + "id": "cloud-datastore", + "target": "googleapis/google-cloud-php-datastore.git", + "path": "Datastore", + "entry": "src/DatastoreClient.php" + } + }, + "autoload": { + "psr-4": { + "Google\\Cloud\\Datastore\\": "src", + "GPBMetadata\\Google\\Datastore\\": "metadata" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Cloud Datastore Client for PHP", + "support": { + "source": "https://github.com/googleapis/google-cloud-php-datastore/tree/v1.16.4" + }, + "time": "2022-10-14T17:32:26+00:00" }, { "name": "google/cloud-error-reporting", - "version": "v0.19.5", + "version": "v0.19.6", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-errorreporting.git", - "reference": "f8b38b453a17bd88fe31fc5c07f48f3eb67ebca0" + "reference": "3b090f22aadddb64433a18f94468433f31758e45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-errorreporting/zipball/f8b38b453a17bd88fe31fc5c07f48f3eb67ebca0", - "reference": "f8b38b453a17bd88fe31fc5c07f48f3eb67ebca0", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-errorreporting/zipball/3b090f22aadddb64433a18f94468433f31758e45", + "reference": "3b090f22aadddb64433a18f94468433f31758e45", "shasum": "" }, "require": { @@ -1093,6 +1056,7 @@ }, "require-dev": { "google/cloud-core": "^1.39", + "phpspec/prophecy": "^1.10.3", "phpunit/phpunit": "^4.8|^5.0|^8.0", "yoast/phpunit-polyfills": "^1.0" }, @@ -1121,22 +1085,22 @@ ], "description": "Stackdriver Error Reporting Client for PHP", "support": { - "source": "https://github.com/googleapis/google-cloud-php-errorreporting/tree/v0.19.5" + "source": "https://github.com/googleapis/google-cloud-php-errorreporting/tree/v0.19.6" }, - "time": "2022-08-05T00:41:21+00:00" + "time": "2022-08-23T20:22:22+00:00" }, { "name": "google/cloud-logging", - "version": "v1.24.6", + "version": "v1.24.8", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-logging.git", - "reference": "318ed0801f581e6a24150d48475753e8dcd6168c" + "reference": "0ef2e2a4f07af9bec08d871e277edf6b066b55e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-logging/zipball/318ed0801f581e6a24150d48475753e8dcd6168c", - "reference": "318ed0801f581e6a24150d48475753e8dcd6168c", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-logging/zipball/0ef2e2a4f07af9bec08d871e277edf6b066b55e2", + "reference": "0ef2e2a4f07af9bec08d871e277edf6b066b55e2", "shasum": "" }, "require": { @@ -1156,6 +1120,7 @@ "google/cloud-storage": "^1.3", "opis/closure": "^3", "phpdocumentor/reflection": "^3.0||^4.0", + "phpspec/prophecy": "^1.10.3", "phpunit/phpunit": "^4.8|^5.0|^8.0", "squizlabs/php_codesniffer": "2.*", "yoast/phpunit-polyfills": "^1.0" @@ -1163,7 +1128,7 @@ "suggest": { "ext-grpc": "The gRPC extension enables use of the performant gRPC transport", "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.", - "psr/log": "For using the PSR logger" + "psr/log": "For using the PSR logger. Currently supports versions 1 and 2." }, "type": "library", "extra": { @@ -1186,22 +1151,22 @@ ], "description": "Stackdriver Logging Client for PHP", "support": { - "source": "https://github.com/googleapis/google-cloud-php-logging/tree/v1.24.6" + "source": "https://github.com/googleapis/google-cloud-php-logging/tree/v1.24.8" }, - "time": "2022-08-05T00:41:21+00:00" + "time": "2022-09-16T02:33:04+00:00" }, { "name": "google/cloud-storage", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-cloud-php-storage.git", - "reference": "017c14eeb2a3717a1ce9c27a39c66a779e6914cf" + "reference": "7b32f74023e4970159a489bd6ab703210e7c1d35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/017c14eeb2a3717a1ce9c27a39c66a779e6914cf", - "reference": "017c14eeb2a3717a1ce9c27a39c66a779e6914cf", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/7b32f74023e4970159a489bd6ab703210e7c1d35", + "reference": "7b32f74023e4970159a489bd6ab703210e7c1d35", "shasum": "" }, "require": { @@ -1213,6 +1178,7 @@ "google/cloud-pubsub": "^1.0", "phpdocumentor/reflection": "^3.0||^4.0", "phpseclib/phpseclib": "^2.0||^3.0", + "phpspec/prophecy": "^1.10.3", "phpunit/phpunit": "^4.8|^5.0|^8.0", "squizlabs/php_codesniffer": "2.*", "yoast/phpunit-polyfills": "^1.0" @@ -1241,9 +1207,9 @@ ], "description": "Cloud Storage Client for PHP", "support": { - "source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.28.0" + "source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.29.0" }, - "time": "2022-07-29T00:07:49+00:00" + "time": "2022-11-03T21:58:06+00:00" }, { "name": "google/cloud-trace", @@ -1302,16 +1268,16 @@ }, { "name": "google/common-protos", - "version": "v3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/googleapis/common-protos-php.git", - "reference": "168393c1d19297fde8d5c875a540ba92c5aa970c" + "reference": "5634c15f2ac5dbf2e3fd5ff7400d77661ab1b0d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/168393c1d19297fde8d5c875a540ba92c5aa970c", - "reference": "168393c1d19297fde8d5c875a540ba92c5aa970c", + "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/5634c15f2ac5dbf2e3fd5ff7400d77661ab1b0d4", + "reference": "5634c15f2ac5dbf2e3fd5ff7400d77661ab1b0d4", "shasum": "" }, "require": { @@ -1324,8 +1290,17 @@ "type": "library", "autoload": { "psr-4": { - "Google\\": "src", - "GPBMetadata\\Google\\": "metadata" + "Google\\Api\\": "src/Api", + "Google\\Iam\\": "src/Iam", + "Google\\Rpc\\": "src/Rpc", + "Google\\Type\\": "src/Type", + "Google\\Cloud\\": "src/Cloud", + "GPBMetadata\\Google\\Api\\": "metadata/Api", + "GPBMetadata\\Google\\Iam\\": "metadata/Iam", + "GPBMetadata\\Google\\Rpc\\": "metadata/Rpc", + "GPBMetadata\\Google\\Type\\": "metadata/Type", + "GPBMetadata\\Google\\Cloud\\": "metadata/Cloud", + "GPBMetadata\\Google\\Logging\\": "metadata/Logging" } }, "notification-url": "https://packagist.org/downloads/", @@ -1339,9 +1314,9 @@ ], "support": { "issues": "https://github.com/googleapis/common-protos-php/issues", - "source": "https://github.com/googleapis/common-protos-php/tree/v3.0.0" + "source": "https://github.com/googleapis/common-protos-php/tree/v3.1.0" }, - "time": "2022-07-29T20:50:18+00:00" + "time": "2022-10-05T23:22:51+00:00" }, { "name": "google/crc32", @@ -1391,16 +1366,16 @@ }, { "name": "google/gax", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/googleapis/gax-php.git", - "reference": "c6656a8d440dcc24ca73c4e34db4545202c72e23" + "reference": "bb8d95187dcfebe04a40d2de916951fa4942fc35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/gax-php/zipball/c6656a8d440dcc24ca73c4e34db4545202c72e23", - "reference": "c6656a8d440dcc24ca73c4e34db4545202c72e23", + "url": "https://api.github.com/repos/googleapis/gax-php/zipball/bb8d95187dcfebe04a40d2de916951fa4942fc35", + "reference": "bb8d95187dcfebe04a40d2de916951fa4942fc35", "shasum": "" }, "require": { @@ -1418,6 +1393,7 @@ "ext-protobuf": "<3.7.0" }, "require-dev": { + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^5.5||^8.5", "squizlabs/php_codesniffer": "3.*", "yoast/phpunit-polyfills": "^1.0" @@ -1440,22 +1416,22 @@ ], "support": { "issues": "https://github.com/googleapis/gax-php/issues", - "source": "https://github.com/googleapis/gax-php/tree/v1.16.0" + "source": "https://github.com/googleapis/gax-php/tree/v1.17.0" }, - "time": "2022-08-10T19:33:35+00:00" + "time": "2022-09-12T15:22:54+00:00" }, { "name": "google/grpc-gcp", - "version": "v0.2.0", + "version": "v0.2.1", "source": { "type": "git", "url": "https://github.com/GoogleCloudPlatform/grpc-gcp-php.git", - "reference": "2465c2273e11ada1e95155aa1e209f3b8f03c314" + "reference": "899d0112812a812df7692617a59f4076f0d01719" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GoogleCloudPlatform/grpc-gcp-php/zipball/2465c2273e11ada1e95155aa1e209f3b8f03c314", - "reference": "2465c2273e11ada1e95155aa1e209f3b8f03c314", + "url": "https://api.github.com/repos/GoogleCloudPlatform/grpc-gcp-php/zipball/899d0112812a812df7692617a59f4076f0d01719", + "reference": "899d0112812a812df7692617a59f4076f0d01719", "shasum": "" }, "require": { @@ -1485,9 +1461,9 @@ "description": "gRPC GCP library for channel management", "support": { "issues": "https://github.com/GoogleCloudPlatform/grpc-gcp-php/issues", - "source": "https://github.com/GoogleCloudPlatform/grpc-gcp-php/tree/v0.2.0" + "source": "https://github.com/GoogleCloudPlatform/grpc-gcp-php/tree/v0.2.1" }, - "time": "2021-09-27T22:57:18+00:00" + "time": "2022-10-11T15:54:47+00:00" }, { "name": "google/longrunning", @@ -1535,16 +1511,16 @@ }, { "name": "google/protobuf", - "version": "v3.21.5", + "version": "v3.21.9", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "70649d33d2b6e8fd0db6d9b6fffc7f46f01f1438" + "reference": "1bf02c57f260c5eea5e75a35c1a943fe943a188a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/70649d33d2b6e8fd0db6d9b6fffc7f46f01f1438", - "reference": "70649d33d2b6e8fd0db6d9b6fffc7f46f01f1438", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/1bf02c57f260c5eea5e75a35c1a943fe943a188a", + "reference": "1bf02c57f260c5eea5e75a35c1a943fe943a188a", "shasum": "" }, "require": { @@ -1573,9 +1549,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.21.5" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.21.9" }, - "time": "2022-08-09T19:53:56+00:00" + "time": "2022-10-26T20:30:45+00:00" }, { "name": "grpc/grpc", @@ -1623,16 +1599,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { @@ -1647,10 +1623,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1660,8 +1636,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1727,7 +1707,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -1743,20 +1723,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1811,7 +1791,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1827,20 +1807,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.0", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "13388f00956b1503577598873fffb5ae994b5737" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", - "reference": "13388f00956b1503577598873fffb5ae994b5737", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1854,15 +1834,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { "dev-master": "2.4-dev" } @@ -1926,7 +1910,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1942,7 +1926,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:11+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "jean85/pretty-package-versions", @@ -2254,24 +2238,24 @@ }, { "name": "opencensus/opencensus", - "version": "v0.6.0", + "version": "v0.7.0", "source": { "type": "git", "url": "https://github.com/census-instrumentation/opencensus-php.git", - "reference": "007b35d8f7ed21cab9aa47406578ae02f73f91c5" + "reference": "0cfda5037e7fe30f5411907d377a7110c5c68b3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/census-instrumentation/opencensus-php/zipball/007b35d8f7ed21cab9aa47406578ae02f73f91c5", - "reference": "007b35d8f7ed21cab9aa47406578ae02f73f91c5", + "url": "https://api.github.com/repos/census-instrumentation/opencensus-php/zipball/0cfda5037e7fe30f5411907d377a7110c5c68b3a", + "reference": "0cfda5037e7fe30f5411907d377a7110c5c68b3a", "shasum": "" }, "require": { "cache/adapter-common": "^1.0", "php": ">=7.1", - "psr/cache": "^1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/log": "^1.0", - "ramsey/uuid": "~3" + "ramsey/uuid": "^3.0 || ^4.0" }, "conflict": { "ext-opencensus": "< 0.1.0" @@ -2279,8 +2263,8 @@ "require-dev": { "guzzlehttp/guzzle": "~5.3", "guzzlehttp/psr7": "~1.4", - "phpunit/phpunit": "^5.0", - "squizlabs/php_codesniffer": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", "symfony/yaml": "~3.3", "twig/twig": "~2.0 || ~1.35" }, @@ -2316,9 +2300,9 @@ "description": "OpenCensus Trace Client for PHP", "support": { "issues": "https://github.com/census-instrumentation/opencensus-php/issues", - "source": "https://github.com/census-instrumentation/opencensus-php/tree/master" + "source": "https://github.com/census-instrumentation/opencensus-php/tree/v0.7.0" }, - "time": "2020-06-12T18:56:55+00:00" + "time": "2021-05-31T16:10:53+00:00" }, { "name": "opencensus/opencensus-exporter-stackdriver", @@ -2366,68 +2350,18 @@ }, "time": "2018-04-19T16:43:12+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2020-10-15T08:29:30+00:00" - }, { "name": "php-http/client-common", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "d135751167d57e27c74de674d6a30cef2dc8e054" + "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/d135751167d57e27c74de674d6a30cef2dc8e054", - "reference": "d135751167d57e27c74de674d6a30cef2dc8e054", + "url": "https://api.github.com/repos/php-http/client-common/zipball/45db684cd4e186dcdc2b9c06b22970fe123796c0", + "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0", "shasum": "" }, "require": { @@ -2487,9 +2421,9 @@ ], "support": { "issues": "https://github.com/php-http/client-common/issues", - "source": "https://github.com/php-http/client-common/tree/2.5.0" + "source": "https://github.com/php-http/client-common/tree/2.6.0" }, - "time": "2021-11-26T15:01:24+00:00" + "time": "2022-09-29T09:59:43+00:00" }, { "name": "php-http/curl-client", @@ -2987,22 +2921,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -3029,9 +2968,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -3389,64 +3328,46 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "ramsey/uuid", - "version": "3.9.6", + "name": "ramsey/collection", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "ffa80ab953edd85d5b6c004f96181a538aad35a3" + "url": "https://github.com/ramsey/collection.git", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/ffa80ab953edd85d5b6c004f96181a538aad35a3", - "reference": "ffa80ab953edd85d5b6c004f96181a538aad35a3", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", "shasum": "" }, "require": { - "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | ^9.99.99", - "php": "^5.4 | ^7.0 | ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "replace": { - "rhumsaa/uuid": "self.version" + "php": "^7.3 || ^8", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | >=2.1.0 <=2.3.2", - "mockery/mockery": "^0.9.11 | ^1", - "moontoast/math": "^1.1", - "nikic/php-parser": "<=4.5.0", - "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1 | ^2.6", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpunit/phpunit": ">=4.8.36 <9.0.0 | >=9.3.0", + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", + "fakerphp/faker": "^1.5", + "hamcrest/hamcrest-php": "^2", + "jangregor/phpstan-prophecy": "^0.8", + "mockery/mockery": "^1.3", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", + "phpunit/phpunit": "^8.5 || ^9", + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", "squizlabs/php_codesniffer": "^3.5", - "yoast/phpunit-polyfills": "^1.0" - }, - "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + "vimeo/psalm": "^4.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Ramsey\\Uuid\\": "src/" + "Ramsey\\Collection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3458,28 +3379,118 @@ "name": "Ben Ramsey", "email": "ben@benramsey.com", "homepage": "https://benramsey.com" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" } ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ - "guid", + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2021-10-10T03:01:02+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.2.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "shasum": "" + }, + "require": { + "brick/math": "^0.8 || ^0.9", + "ext-json": "*", + "php": "^7.2 || ^8.0", + "ramsey/collection": "^1.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "moontoast/math": "^1.1", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5 || ^9", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.x-dev" + }, + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", "identifier", "uuid" ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid", - "wiki": "https://github.com/ramsey/uuid/wiki" + "source": "https://github.com/ramsey/uuid/tree/4.2.3" }, "funding": [ { @@ -3491,20 +3502,20 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:07:42+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "rize/uri-template", - "version": "0.3.4", + "version": "0.3.5", "source": { "type": "git", "url": "https://github.com/rize/UriTemplate.git", - "reference": "2a874863c48d643b9e2e254ab288ec203060a0b8" + "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rize/UriTemplate/zipball/2a874863c48d643b9e2e254ab288ec203060a0b8", - "reference": "2a874863c48d643b9e2e254ab288ec203060a0b8", + "url": "https://api.github.com/repos/rize/UriTemplate/zipball/5ed4ba8ea34af84485dea815d4b6b620794d1168", + "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168", "shasum": "" }, "require": { @@ -3537,50 +3548,56 @@ ], "support": { "issues": "https://github.com/rize/UriTemplate/issues", - "source": "https://github.com/rize/UriTemplate/tree/0.3.4" + "source": "https://github.com/rize/UriTemplate/tree/0.3.5" }, "funding": [ { "url": "https://www.paypal.me/rezigned", "type": "custom" }, + { + "url": "https://github.com/rezigned", + "type": "github" + }, { "url": "https://opencollective.com/rize-uri-template", "type": "open_collective" } ], - "time": "2021-10-09T06:30:16+00:00" + "time": "2022-10-12T17:22:51+00:00" }, { "name": "robmorgan/phinx", - "version": "0.11.7", + "version": "0.12.13", "source": { "type": "git", "url": "https://github.com/cakephp/phinx.git", - "reference": "3cdde73e0c33c410e076108b3e1603fabb5b330d" + "reference": "6eb0f295e140ed2804d93396755f0ce9ada4ec07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/phinx/zipball/3cdde73e0c33c410e076108b3e1603fabb5b330d", - "reference": "3cdde73e0c33c410e076108b3e1603fabb5b330d", + "url": "https://api.github.com/repos/cakephp/phinx/zipball/6eb0f295e140ed2804d93396755f0ce9ada4ec07", + "reference": "6eb0f295e140ed2804d93396755f0ce9ada4ec07", "shasum": "" }, "require": { - "cakephp/collection": "^3.7", - "cakephp/database": "^3.7", - "php": ">=5.6", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" + "cakephp/database": "^4.0", + "php": ">=7.2", + "psr/container": "^1.0 || ^2.0", + "symfony/config": "^3.4|^4.0|^5.0|^6.0", + "symfony/console": "^3.4|^4.0|^5.0|^6.0" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^3.0", + "cakephp/cakephp-codesniffer": "^4.0", "ext-json": "*", - "phpunit/phpunit": ">=5.7,<8.0", - "sebastian/comparator": ">=1.2.3" + "ext-pdo": "*", + "phpunit/phpunit": "^8.5|^9.3", + "sebastian/comparator": ">=1.2.3", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "ext-json": "Install if using JSON configuration format", + "ext-pdo": "PDO extension is needed", "symfony/yaml": "Install if using YAML configuration format" }, "bin": [ @@ -3631,9 +3648,9 @@ ], "support": { "issues": "https://github.com/cakephp/phinx/issues", - "source": "https://github.com/cakephp/phinx/tree/0.11.7" + "source": "https://github.com/cakephp/phinx/tree/0.12.13" }, - "time": "2020-05-09T13:59:05+00:00" + "time": "2022-10-03T04:57:40+00:00" }, { "name": "sendgrid/php-http-client", @@ -3701,16 +3718,16 @@ }, { "name": "sendgrid/sendgrid", - "version": "7.11.5", + "version": "8.0.1", "source": { "type": "git", "url": "https://github.com/sendgrid/sendgrid-php.git", - "reference": "1d2fd3b72687fe82264853a8888b014f8f99e81f" + "reference": "285381257100b73aa50d8d70f0bcfb1f48b63747" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sendgrid/sendgrid-php/zipball/1d2fd3b72687fe82264853a8888b014f8f99e81f", - "reference": "1d2fd3b72687fe82264853a8888b014f8f99e81f", + "url": "https://api.github.com/repos/sendgrid/sendgrid-php/zipball/285381257100b73aa50d8d70f0bcfb1f48b63747", + "reference": "285381257100b73aa50d8d70f0bcfb1f48b63747", "shasum": "" }, "require": { @@ -3718,7 +3735,7 @@ "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "php": ">=5.6", + "php": ">=7.3", "sendgrid/php-http-client": "~3.10", "starkbank/ecdsa": "0.*" }, @@ -3726,7 +3743,8 @@ "sendgrid/sendgrid-php": "*" }, "require-dev": { - "phpunit/phpunit": "^5.7.9 || ^6.4.3", + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "3.*", "swaggest/json-diff": "^3.4" }, @@ -3759,23 +3777,22 @@ "twilio sendgrid" ], "support": { - "issues": "https://github.com/sendgrid/sendgrid-php/issues", - "source": "https://github.com/sendgrid/sendgrid-php/tree/7.11.5" + "source": "https://github.com/sendgrid/sendgrid-php/tree/8.0.1" }, - "time": "2022-03-09T20:21:56+00:00" + "time": "2022-08-10T18:37:45+00:00" }, { "name": "sentry/sentry", - "version": "3.7.0", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795" + "reference": "4902f43640963ed45517fd7c1da7fdd5511bb304" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/877bca3f0f0ac0fc8ec0a218c6070cccea266795", - "reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/4902f43640963ed45517fd7c1da7fdd5511bb304", + "reference": "4902f43640963ed45517fd7c1da7fdd5511bb304", "shasum": "" }, "require": { @@ -3794,8 +3811,7 @@ "psr/http-message-implementation": "^1.0", "psr/log": "^1.0|^2.0|^3.0", "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0", - "symfony/polyfill-php80": "^1.17", - "symfony/polyfill-uuid": "^1.13.1" + "symfony/polyfill-php80": "^1.17" }, "conflict": { "php-http/client-common": "1.8.0", @@ -3821,7 +3837,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "3.12.x-dev" } }, "autoload": { @@ -3855,7 +3871,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.7.0" + "source": "https://github.com/getsentry/sentry-php/tree/3.12.0" }, "funding": [ { @@ -3867,33 +3883,33 @@ "type": "custom" } ], - "time": "2022-07-18T07:55:36+00:00" + "time": "2022-11-22T10:57:08+00:00" }, { "name": "smarty/smarty", - "version": "v3.1.47", + "version": "v4.3.0", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "a09364fe1706cb465e910eb040e592053d7effb8" + "reference": "c02e9e135ea719b91f457a0072748ded0e852e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/a09364fe1706cb465e910eb040e592053d7effb8", - "reference": "a09364fe1706cb465e910eb040e592053d7effb8", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c02e9e135ea719b91f457a0072748ded0e852e7d", + "reference": "c02e9e135ea719b91f457a0072748ded0e852e7d", "shasum": "" }, "require": { - "php": "^5.2 || ^7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8", + "phpunit/phpunit": "^8.5 || ^7.5", "smarty/smarty-lexer": "^3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -3917,20 +3933,23 @@ { "name": "Rodney Rehm", "email": "rodney.rehm@medialize.de" + }, + { + "name": "Simon Wisselink", + "homepage": "https://www.iwink.nl/" } ], "description": "Smarty - the compiling PHP template engine", - "homepage": "http://www.smarty.net", + "homepage": "https://smarty-php.github.io/smarty/", "keywords": [ "templating" ], "support": { - "forum": "http://www.smarty.net/forums/", - "irc": "irc://irc.freenode.org/smarty", + "forum": "https://github.com/smarty-php/smarty/discussions", "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v3.1.47" + "source": "https://github.com/smarty-php/smarty/tree/v4.3.0" }, - "time": "2022-09-14T11:29:00+00:00" + "time": "2022-11-22T21:47:32+00:00" }, { "name": "starkbank/ecdsa", @@ -3977,16 +3996,16 @@ }, { "name": "steampixel/simple-php-router", - "version": "0.7.0", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/steampixel/simplePHPRouter.git", - "reference": "91aec2d0bca3619c0552e2bfcebb8936e6f83bb9" + "reference": "c996d75b34c2c6da45d4dc737f61c0ee8fed5d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/steampixel/simplePHPRouter/zipball/91aec2d0bca3619c0552e2bfcebb8936e6f83bb9", - "reference": "91aec2d0bca3619c0552e2bfcebb8936e6f83bb9", + "url": "https://api.github.com/repos/steampixel/simplePHPRouter/zipball/c996d75b34c2c6da45d4dc737f61c0ee8fed5d2b", + "reference": "c996d75b34c2c6da45d4dc737f61c0ee8fed5d2b", "shasum": "" }, "type": "library", @@ -4001,7 +4020,7 @@ ], "authors": [ { - "name": "Christoph Stitz", + "name": "Steampixel", "email": "info@steampixel.de", "homepage": "https://steampixel.de/" }, @@ -4011,12 +4030,12 @@ "homepage": "https://www.maxbits.net/" } ], - "description": "This is a simple and small PHP router that can handel the whole url routing for your project.", + "description": "This is a simple and small PHP router that can handle the whole url routing for your project.", "support": { "issues": "https://github.com/steampixel/simplePHPRouter/issues", - "source": "https://github.com/steampixel/simplePHPRouter/tree/0.7.0" + "source": "https://github.com/steampixel/simplePHPRouter/tree/0.7.1" }, - "time": "2021-03-22T08:11:59+00:00" + "time": "2022-10-12T18:04:20+00:00" }, { "name": "symfony/config", @@ -4099,16 +4118,16 @@ }, { "name": "symfony/console", - "version": "v5.4.11", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { @@ -4178,7 +4197,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.11" + "source": "https://github.com/symfony/console/tree/v5.4.16" }, "funding": [ { @@ -4194,7 +4213,7 @@ "type": "tidelift" } ], - "time": "2022-07-22T10:42:43+00:00" + "time": "2022-11-25T14:09:27+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4265,16 +4284,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.11", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd" + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6699fb0228d1bc35b12aed6dd5e7455457609ddd", - "reference": "6699fb0228d1bc35b12aed6dd5e7455457609ddd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", "shasum": "" }, "require": { @@ -4309,7 +4328,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.11" + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" }, "funding": [ { @@ -4325,7 +4344,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { "name": "symfony/options-resolver", @@ -4398,16 +4417,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -4422,7 +4441,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4460,7 +4479,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -4476,20 +4495,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -4501,7 +4520,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4541,7 +4560,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -4557,20 +4576,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -4582,7 +4601,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4625,7 +4644,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -4641,20 +4660,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -4669,7 +4688,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4708,7 +4727,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -4724,20 +4743,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -4746,7 +4765,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4787,7 +4806,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -4803,20 +4822,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -4825,7 +4844,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4870,7 +4889,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -4886,20 +4905,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -4908,7 +4927,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4949,89 +4968,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-uuid", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/a41886c1c81dc075a09c71fe6db5b9d68c79de23", - "reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-uuid": "*" - }, - "suggest": { - "ext-uuid": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Uuid\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "GrĂ©goire Pineau", - "email": "lyrixx@lyrixx.info" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for uuid functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "uuid" - ], - "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -5047,41 +4984,33 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" + "php": "^7.1.3" }, "suggest": { + "psr/container": "", "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.1-dev" } }, "autoload": { @@ -5114,36 +5043,22 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2019-05-28T07:50:59+00:00" }, { "name": "symfony/string", - "version": "v5.4.11", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322" + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5eb661e49ad389e4ae2b6e4df8d783a8a6548322", - "reference": "5eb661e49ad389e4ae2b6e4df8d783a8a6548322", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", "shasum": "" }, "require": { @@ -5200,7 +5115,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.11" + "source": "https://github.com/symfony/string/tree/v5.4.15" }, "funding": [ { @@ -5216,20 +5131,20 @@ "type": "tidelift" } ], - "time": "2022-07-24T16:15:25+00:00" + "time": "2022-10-05T15:16:54+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.11", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "05d4ea560f3402c6c116afd99fdc66e60eda227e" + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/05d4ea560f3402c6c116afd99fdc66e60eda227e", - "reference": "05d4ea560f3402c6c116afd99fdc66e60eda227e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", "shasum": "" }, "require": { @@ -5275,7 +5190,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.11" + "source": "https://github.com/symfony/yaml/tree/v5.4.16" }, "funding": [ { @@ -5291,35 +5206,106 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2022-11-25T16:04:03+00:00" } ], "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, { "name": "composer/semver", - "version": "2.0.0", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "0ec124f57c7e23925c006cbad0de853e3aec3ba2" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/0ec124f57c7e23925c006cbad0de853e3aec3ba2", - "reference": "0ec124f57c7e23925c006cbad0de853e3aec3ba2", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.19", - "phpunit/phpunit": "^4.5 || ^5.0.5 || ^7" + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -5358,41 +5344,47 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/2.0.0" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { "url": "https://packagist.com", "type": "custom" }, + { + "url": "https://github.com/composer", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2020-04-21T13:19:12+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.6", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -5418,7 +5410,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -5434,7 +5426,7 @@ "type": "tidelift" } ], - "time": "2021-03-25T17:01:18+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "doctrine/annotations", @@ -5632,85 +5624,65 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", + "version": "v3.13.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a6232229a8309e8811dc751c28b91cb34b2943e1", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^1.13", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php81": "^1.25", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.10", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.0", + "symfony/yaml": "^5.4 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5728,8 +5700,8 @@ ], "description": "A tool to automatically fix PHP code style", "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.0" }, "funding": [ { @@ -5737,80 +5709,27 @@ "type": "github" } ], - "time": "2021-11-15T17:17:55+00:00" + "time": "2022-10-31T19:28:50+00:00" }, { - "name": "jakub-onderka/php-parallel-lint", - "version": "v1.0.0", + "name": "microsoft/tolerant-php-parser", + "version": "v0.1.1", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git", - "reference": "04fbd3f5fb1c83f08724aa58a23db90bd9086ee8" + "url": "https://github.com/microsoft/tolerant-php-parser.git", + "reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/04fbd3f5fb1c83f08724aa58a23db90bd9086ee8", - "reference": "04fbd3f5fb1c83f08724aa58a23db90bd9086ee8", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/6a965617cf484355048ac6d2d3de7b6ec93abb16", + "reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.2" }, "require-dev": { - "jakub-onderka/php-console-highlighter": "~0.3", - "nette/tester": "~1.3", - "squizlabs/php_codesniffer": "~2.7" - }, - "suggest": { - "jakub-onderka/php-console-highlighter": "Highlight syntax in code snippet" - }, - "bin": [ - "parallel-lint" - ], - "type": "library", - "autoload": { - "classmap": [ - "./" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "ahoj@jakubonderka.cz" - } - ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", - "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint", - "support": { - "issues": "https://github.com/JakubOnderka/PHP-Parallel-Lint/issues", - "source": "https://github.com/JakubOnderka/PHP-Parallel-Lint/tree/master" - }, - "abandoned": "php-parallel-lint/php-parallel-lint", - "time": "2018-02-24T15:31:20+00:00" - }, - { - "name": "microsoft/tolerant-php-parser", - "version": "v0.0.20", - "source": { - "type": "git", - "url": "https://github.com/microsoft/tolerant-php-parser.git", - "reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4", - "reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^8.5.15" }, "type": "library", "autoload": { @@ -5833,22 +5752,22 @@ "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", "support": { "issues": "https://github.com/microsoft/tolerant-php-parser/issues", - "source": "https://github.com/microsoft/tolerant-php-parser/tree/master" + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.1" }, - "time": "2020-02-18T02:57:19+00:00" + "time": "2021-07-16T21:28:12+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v2.1.0", + "version": "v4.0.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", "shasum": "" }, "require": { @@ -5856,10 +5775,10 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.6" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -5884,35 +5803,43 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/master" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" }, - "time": "2020-04-16T18:48:43+00:00" + "time": "2020-12-01T19:48:11+00:00" }, { "name": "odan/phinx-migrations-generator", - "version": "4.6.1", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/odan/phinx-migrations-generator.git", - "reference": "7a8afe501520e322452bae2e3188756eafc7194a" + "reference": "79439b5678db5b0ec1f367235ccfe298313aaad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/odan/phinx-migrations-generator/zipball/7a8afe501520e322452bae2e3188756eafc7194a", - "reference": "7a8afe501520e322452bae2e3188756eafc7194a", + "url": "https://api.github.com/repos/odan/phinx-migrations-generator/zipball/79439b5678db5b0ec1f367235ccfe298313aaad3", + "reference": "79439b5678db5b0ec1f367235ccfe298313aaad3", "shasum": "" }, "require": { - "php": "^7.1", + "ext-json": "*", + "ext-pdo": "*", + "php": "^7.2 || ^8.0", "riimu/kit-phpencoder": "^2.4", - "robmorgan/phinx": "^0.11", - "symfony/console": "^2.8|^3.0|^4.0|^5.0" + "robmorgan/phinx": "^0.12", + "symfony/console": "^2.8 || ^3.0 || ^4.0 || ^5.0 || 6.0.*", + "symfony/polyfill-php73": "^1.18" }, "require-dev": { - "overtrue/phplint": "^1.1", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0", - "squizlabs/php_codesniffer": "^3.4" + "friendsofphp/php-cs-fixer": "^3.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8 || ^9", + "squizlabs/php_codesniffer": "^3.4", + "symfony/event-dispatcher": "^5 || 6.0.*", + "symfony/filesystem": "^5 || 6.0.*", + "symfony/finder": "^5 || 6.0.*", + "symfony/string": "^5 || 6.0.*", + "symfony/uid": "^5 || 6.0.*" }, "bin": [ "./bin/phinx-migrations" @@ -5939,49 +5866,50 @@ ], "support": { "issues": "https://github.com/odan/phinx-migrations-generator/issues", - "source": "https://github.com/odan/phinx-migrations-generator/tree/4.6.1" + "source": "https://github.com/odan/phinx-migrations-generator/tree/5.6.0" }, - "time": "2020-01-08T08:33:14+00:00" + "time": "2022-08-05T21:40:16+00:00" }, { "name": "phan/phan", - "version": "2.7.3", + "version": "5.4.1", "source": { "type": "git", "url": "https://github.com/phan/phan.git", - "reference": "37024c7c84ca153f8f7311db24f08d82ca5a237f" + "reference": "fef40178a952bcfcc3f69b76989dd613c3d5c759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phan/phan/zipball/37024c7c84ca153f8f7311db24f08d82ca5a237f", - "reference": "37024c7c84ca153f8f7311db24f08d82ca5a237f", + "url": "https://api.github.com/repos/phan/phan/zipball/fef40178a952bcfcc3f69b76989dd613c3d5c759", + "reference": "fef40178a952bcfcc3f69b76989dd613c3d5c759", "shasum": "" }, "require": { - "composer/semver": "^1.4|^2.0", - "composer/xdebug-handler": "^1.3.2", + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0|^3.0", "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.0.4", - "microsoft/tolerant-php-parser": "0.0.20", - "netresearch/jsonmapper": "^1.6.0|^2.0", - "php": "^7.1.0", - "sabre/event": "^5.0", - "symfony/console": "^2.3|^3.0|^4.0|^5.0", + "microsoft/tolerant-php-parser": "0.1.1", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.1.3", + "symfony/console": "^3.2|^4.0|^5.0|^6.0", "symfony/polyfill-mbstring": "^1.11.0", - "symfony/polyfill-php72": "^1.15" + "symfony/polyfill-php80": "^1.20.0", + "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" }, "require-dev": { - "brianium/paratest": "^4.0.0", - "phpunit/phpunit": "^7.5.0" + "phpunit/phpunit": "^8.5.0" }, "suggest": { - "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.6+ is recommended.", + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.16+ is recommended.", "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", - "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions." + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.", + "ext-var_representation": "Suggested for converting values to strings in issue messages" }, "bin": [ "phan", @@ -6017,64 +5945,66 @@ ], "support": { "issues": "https://github.com/phan/phan/issues", - "source": "https://github.com/phan/phan/tree/v2" + "source": "https://github.com/phan/phan/tree/5.4.1" }, - "time": "2020-07-02T01:28:55+00:00" + "time": "2022-08-26T00:49:07+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "name": "php-parallel-lint/php-parallel-lint", + "version": "v1.3.2", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "ext-json": "*", + "php": ">=5.3.0" + }, + "replace": { + "grogy/php-parallel-lint": "*", + "jakub-onderka/php-parallel-lint": "*" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" + "nette/tester": "^1.3 || ^2.0", + "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", + "squizlabs/php_codesniffer": "^3.6" }, + "suggest": { + "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" + }, + "bin": [ + "parallel-lint" + ], "type": "library", "autoload": { "classmap": [ - "src/" + "./src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "BSD-2-Clause" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" + "name": "Jakub Onderka", + "email": "ahoj@jakubonderka.cz" } ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], + "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" }, - "time": "2020-10-14T08:39:05+00:00" + "time": "2022-02-21T12:50:22+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -6188,25 +6118,30 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -6232,9 +6167,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "riimu/kit-phpencoder", @@ -6357,6 +6292,72 @@ }, "time": "2021-11-04T06:51:17+00:00" }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, { "name": "symfony/event-dispatcher", "version": "v5.4.9", @@ -6585,107 +6586,31 @@ "time": "2022-07-29T07:37:50+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "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": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "name": "symfony/process", + "version": "v5.4.11", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "url": "https://github.com/symfony/process.git", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6693,24 +6618,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/process/tree/v5.4.11" }, "funding": [ { @@ -6726,30 +6645,30 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { - "name": "symfony/process", - "version": "v5.4.11", + "name": "symfony/stopwatch", + "version": "v5.4.13", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + "url": "https://github.com/symfony/stopwatch.git", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6df7a3effde34d81717bbef4591e5ffe32226d69", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\Stopwatch\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -6769,10 +6688,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Executes commands in sub-processes", + "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" + "source": "https://github.com/symfony/stopwatch/tree/v5.4.13" }, "funding": [ { @@ -6788,34 +6707,49 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2022-09-28T13:19:49+00:00" }, { - "name": "symfony/stopwatch", - "version": "v5.4.5", + "name": "tysonandre/var_representation_polyfill", + "version": "0.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30" + "url": "https://github.com/TysonAndre/var_representation_polyfill.git", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "ext-tokenizer": "*", + "php": "^7.2.0|^8.0.0" + }, + "provide": { + "ext-var_representation": "*" + }, + "require-dev": { + "phan/phan": "^5.4.1", + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-var_representation": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, "autoload": { + "files": [ + "src/var_representation.php" + ], "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "VarRepresentation\\": "src/VarRepresentation" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6823,34 +6757,19 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Tyson Andre" } ], - "description": "Provides a way to profile code", - "homepage": "https://symfony.com", + "description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export", + "keywords": [ + "var_export", + "var_representation" + ], "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.5" + "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-18T16:06:09+00:00" + "time": "2022-08-31T12:59:22+00:00" }, { "name": "webmozart/assert", @@ -6921,5 +6840,5 @@ "platform-overrides": { "php": "7.4.25" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/cypress-session.php b/cypress-session.php index 13774f84..38e5732a 100644 --- a/cypress-session.php +++ b/cypress-session.php @@ -13,7 +13,7 @@ header('Content-type:application/json;charset=utf-8'); $hostName = @parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_HOST); -if (('localhost' !== $hostName && 'staging.boxtribute.org' !== $hostName)) { +if ('localhost' !== $hostName && 'staging.boxtribute.org' !== $hostName) { echo json_encode(['success' => false]); return; @@ -78,7 +78,7 @@ $auth0->setIdToken($oauth_token['id_token']); // this is removed to resolve "Nonce (nonce) claim must be a string present in the token" // related to https://sentry.io/organizations/boxwise/issues/2956621368/events/3c27d970d0fc4b9d9672d7ef0d2c3554/ - //$user = $auth0->decode($oauth_token['id_token'])->toArray(); + // $user = $auth0->decode($oauth_token['id_token'])->toArray(); } if (isset($oauth_token['expires_in']) && is_numeric($oauth_token['expires_in'])) { diff --git a/db/migrations/20190613211018_new_user_mgmt.php b/db/migrations/20190613211018_new_user_mgmt.php index 938594cf..ddd21410 100644 --- a/db/migrations/20190613211018_new_user_mgmt.php +++ b/db/migrations/20190613211018_new_user_mgmt.php @@ -135,7 +135,7 @@ public function change() $this->table('settings') ->rename('cms_settings') ->save() - ; + ; $this->table('cms_usergroups', [ 'id' => false, 'primary_key' => ['id'], diff --git a/db/migrations/20190912133947_foreign_key_camps.php b/db/migrations/20190912133947_foreign_key_camps.php index 67f963ad..fa81d31a 100644 --- a/db/migrations/20190912133947_foreign_key_camps.php +++ b/db/migrations/20190912133947_foreign_key_camps.php @@ -61,7 +61,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('library_type') ->changeColumn('camp_id', 'integer', [ 'default' => null, diff --git a/db/migrations/20190923101044_foreign_keys_users.php b/db/migrations/20190923101044_foreign_keys_users.php index b6102193..fd43b1f7 100644 --- a/db/migrations/20190923101044_foreign_keys_users.php +++ b/db/migrations/20190923101044_foreign_keys_users.php @@ -39,13 +39,13 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('transactions') ->addForeignKey('user_id', 'cms_users', 'id', [ 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; } } diff --git a/db/migrations/20190923105735_foreign_keys_language.php b/db/migrations/20190923105735_foreign_keys_language.php index e683ee41..8f06c8bc 100644 --- a/db/migrations/20190923105735_foreign_keys_language.php +++ b/db/migrations/20190923105735_foreign_keys_language.php @@ -40,7 +40,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('x_people_languages') ->changeColumn('language_id', 'integer', [ 'signed' => false, @@ -50,6 +50,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; } } diff --git a/db/migrations/20190923140058_foreign_key_locations.php b/db/migrations/20190923140058_foreign_key_locations.php index a61a2a50..c2d01e58 100644 --- a/db/migrations/20190923140058_foreign_key_locations.php +++ b/db/migrations/20190923140058_foreign_key_locations.php @@ -45,6 +45,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; } } diff --git a/db/migrations/20190925105800_foreign_key_laundry_tables.php b/db/migrations/20190925105800_foreign_key_laundry_tables.php index f1df485b..096fe3d0 100644 --- a/db/migrations/20190925105800_foreign_key_laundry_tables.php +++ b/db/migrations/20190925105800_foreign_key_laundry_tables.php @@ -46,7 +46,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('laundry_appointments') ->changeColumn('timeslot', 'integer', [ 'signed' => false, @@ -55,7 +55,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('laundry_machines') ->changeColumn('station', 'integer', [ 'signed' => false, @@ -64,6 +64,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; } } diff --git a/db/migrations/20190930225021_foreign_key_qr.php b/db/migrations/20190930225021_foreign_key_qr.php index e1b89320..4f443261 100644 --- a/db/migrations/20190930225021_foreign_key_qr.php +++ b/db/migrations/20190930225021_foreign_key_qr.php @@ -56,6 +56,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; } } diff --git a/db/migrations/20191001093637_foreign_key_people_id.php b/db/migrations/20191001093637_foreign_key_people_id.php index 129156ef..f32e01d4 100644 --- a/db/migrations/20191001093637_foreign_key_people_id.php +++ b/db/migrations/20191001093637_foreign_key_people_id.php @@ -36,7 +36,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('laundry_appointments') ->changeColumn('people_id', 'integer', [ 'signed' => true, @@ -45,7 +45,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('library_transactions') ->changeColumn('people_id', 'integer', [ 'signed' => true, diff --git a/db/migrations/20191001145902_foreign_key_product.php b/db/migrations/20191001145902_foreign_key_product.php index caf17895..3d6d3179 100644 --- a/db/migrations/20191001145902_foreign_key_product.php +++ b/db/migrations/20191001145902_foreign_key_product.php @@ -36,7 +36,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; $this->table('transactions') ->changeColumn('product_id', 'integer', [ 'null' => true, @@ -50,6 +50,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; } } diff --git a/db/migrations/20191005183100_foreign_key_remainder.php b/db/migrations/20191005183100_foreign_key_remainder.php index 7f149ead..76f00a61 100644 --- a/db/migrations/20191005183100_foreign_key_remainder.php +++ b/db/migrations/20191005183100_foreign_key_remainder.php @@ -26,7 +26,7 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; $this->table('people') ->changeColumn('parent_id', 'integer', [ @@ -41,6 +41,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; } } diff --git a/db/migrations/20191005183200_foreign_key_cmsfunctions.php b/db/migrations/20191005183200_foreign_key_cmsfunctions.php index e1cc70c3..3b4e978e 100644 --- a/db/migrations/20191005183200_foreign_key_cmsfunctions.php +++ b/db/migrations/20191005183200_foreign_key_cmsfunctions.php @@ -19,6 +19,6 @@ public function change() 'delete' => 'RESTRICT', 'update' => 'CASCADE', ]) ->save() -; + ; } } diff --git a/db/migrations/20201213100955_update_delete_constraint_for_tags.php b/db/migrations/20201213100955_update_delete_constraint_for_tags.php index eb2dd60e..31fef2d0 100644 --- a/db/migrations/20201213100955_update_delete_constraint_for_tags.php +++ b/db/migrations/20201213100955_update_delete_constraint_for_tags.php @@ -16,6 +16,6 @@ public function change() 'delete' => 'CASCADE', 'update' => 'CASCADE', ]) ->save() - ; + ; } } diff --git a/db/migrations/20210130175622_add_settings_for_bases.php b/db/migrations/20210130175622_add_settings_for_bases.php index ec780d1f..9fb130f9 100644 --- a/db/migrations/20210130175622_add_settings_for_bases.php +++ b/db/migrations/20210130175622_add_settings_for_bases.php @@ -11,6 +11,6 @@ public function change() ->addColumn('beneficiaryisvolunteer', 'boolean', ['default' => 1, 'null' => false]) ->addColumn('separateshopandwhproducts', 'boolean', ['default' => 0, 'null' => false]) ->save() - ; + ; } } diff --git a/db/migrations/20210823063551_make_cms_functions_id_unsigned.php b/db/migrations/20210823063551_make_cms_functions_id_unsigned.php index 04de5cfc..ef171bdb 100644 --- a/db/migrations/20210823063551_make_cms_functions_id_unsigned.php +++ b/db/migrations/20210823063551_make_cms_functions_id_unsigned.php @@ -31,7 +31,7 @@ public function up() 'delete' => 'SET_NULL', 'update' => 'CASCADE', ]) ->save() - ; + ; $this->table('cms_functions_camps') ->changeColumn('cms_functions_id', 'integer', ['signed' => false, 'null' => false]) diff --git a/db/migrations/20220205073523_add_action_permissions_to_cms_functions.php b/db/migrations/20220205073523_add_action_permissions_to_cms_functions.php index a60e655c..1f3d67a9 100644 --- a/db/migrations/20220205073523_add_action_permissions_to_cms_functions.php +++ b/db/migrations/20220205073523_add_action_permissions_to_cms_functions.php @@ -22,7 +22,7 @@ public function up() */ public function down() { - //$this->execute("SHOW COLUMNS FROM cms_functions like 'action_permissions'"); + // $this->execute("SHOW COLUMNS FROM cms_functions like 'action_permissions'"); $this->table('cms_functions') ->removeColumn('action_permissions')->update(); } diff --git a/db/migrations/20220605074604_drop_product_sizegroup_id_foreign_key.php b/db/migrations/20220605074604_drop_product_sizegroup_id_foreign_key.php index 806e7a41..2b069744 100644 --- a/db/migrations/20220605074604_drop_product_sizegroup_id_foreign_key.php +++ b/db/migrations/20220605074604_drop_product_sizegroup_id_foreign_key.php @@ -10,7 +10,7 @@ public function up() if ($table->hasForeignKey('sizegroup_id')) { $table->dropForeignKey('sizegroup_id') ->update() - ; + ; } } diff --git a/db/migrations/20220605075347_drop_product_camp_id_foreign_key.php b/db/migrations/20220605075347_drop_product_camp_id_foreign_key.php index 34e0036d..e395bf53 100644 --- a/db/migrations/20220605075347_drop_product_camp_id_foreign_key.php +++ b/db/migrations/20220605075347_drop_product_camp_id_foreign_key.php @@ -10,7 +10,7 @@ public function up() if ($table->hasForeignKey('camp_id')) { $table->dropForeignKey('camp_id') ->update() - ; + ; } } diff --git a/db/seeds/Cypress.php b/db/seeds/Cypress.php index 90fa8b36..a7ec6e52 100644 --- a/db/seeds/Cypress.php +++ b/db/seeds/Cypress.php @@ -13,16 +13,16 @@ public function getDependencies() public function run() { - //------------------- organisations + // ------------------- organisations $this->execute("INSERT INTO `organisations` (`id`, `label`, `created`, `created_by`, `deleted`, `modified`, `modified_by`) VALUES (100000000,'TestOrganisation','2019-07-10 08:05:56',1,NULL,NULL,NULL), (100000001,'DummyTestOrgWithBoxes','2019-09-29 08:05:56',1,NULL,NULL,NULL);"); - //------------------- camps + // ------------------- camps $this->execute("INSERT INTO `camps` (`id`, `idcard`, `laundry`, `laundry_cyclestart`, `market`, `maxfooddrops_adult`, `maxfooddrops_child`, `modified`, `modified_by`, `name`, `organisation_id`, `schedulebreak`, `schedulebreakduration`, `schedulebreakstart`, `schedulestart`, `schedulestop`, `scheduletimeslot`, `seq`, `workshop`, `adult_age`, `bicycle`, `bicycle_closingtime`, `bicycle_closingtime_saturday`, `bicyclerenttime`, `created`, `created_by`, `currencyname`, `cyclestart`, `daystokeepdeletedpersons`, `delete_inactive_users`, `deleted`, `dropcapadult`, `dropcapchild`, `dropsperadult`, `dropsperchild`, `extraportion`, `familyidentifier`, `food`) VALUES (100000000,1,0,'2019-01-01',1,25,25,'2019-09-05 13:48:34',1,'TestBase',100000000,'1','1','2019-09-05 13:00:00','2019-09-05 11:00:00','2019-09-05 17:00:00','0.5',3,0,15,0,'2019-09-05 17:30:00','2019-09-05 16:30:00',120,'2019-07-10 08:06:22',1,'Tokens','2019-01-01 00:00:00',9999,99999,NULL,99999,99999,'100','100',0,'Refugee ID',0), (100000001,1,0,'2019-01-01',1,25,25,'2019-09-05 13:48:34',1,'DummyTestBaseWithBoxes',100000001,'1','1','2019-09-05 13:00:00','2019-09-05 11:00:00','2019-09-05 17:00:00','0.5',3,0,15,0,'2019-09-05 17:30:00','2019-09-05 16:30:00',120,'2019-07-10 08:06:22',1,'Tokens','2019-01-01 00:00:00',9999,30,NULL,99999,99999,'100','100',0,'Refugee ID',0);"); - //------------------- cms_functions_camps + // ------------------- cms_functions_camps $this->execute('INSERT INTO `cms_functions_camps` (`cms_functions_id`, `camps_id`) VALUES (158,100000000), (87,100000000), @@ -38,14 +38,14 @@ public function run() (67,100000000), (115,100000000);'); - //------------------- cms_usergroups + // ------------------- cms_usergroups $this->execute("INSERT INTO `cms_usergroups` (`id`, `label`, `created`, `created_by`, `modified`, `modified_by`, `organisation_id`, `userlevel`, `allow_laundry_startcycle`, `allow_laundry_block`, `allow_borrow_adddelete`, `deleted`) VALUES (100000000,'Base TestBase - Volunteer','2019-07-10 08:06:53',1,NULL,NULL,100000000,3,0,0,0,NULL), (100000001,'Base TestBase - Coordinator','2019-07-10 08:07:15',1,NULL,NULL,100000000,2,0,0,0,NULL), (100000002,'Head of Operations','2019-07-10 08:07:44',1,NULL,NULL,100000000,1,0,0,0,NULL), (100000003,'TestUserGroup_NoPermissions','2019-07-10 08:06:53',1,NULL,NULL,100000000,3,0,0,0,NULL);"); - //------------------- cms_usergroups_functions + // ------------------- cms_usergroups_functions $this->execute('INSERT INTO `cms_usergroups_functions` (`cms_functions_id`, `cms_usergroups_id`) VALUES (158,100000002), (90,100000002), @@ -84,14 +84,14 @@ public function run() (156,100000001), (43,100000001);'); - //------------------- cms_usergroups_camps + // ------------------- cms_usergroups_camps $this->execute('INSERT INTO `cms_usergroups_camps` (`camp_id`, `cms_usergroups_id`) VALUES (100000000,100000000), (100000000,100000001), (100000000,100000002), (100000000,100000003);'); - //------------------- cms_users + // ------------------- cms_users $this->execute("INSERT INTO `cms_users` (`id`, `pass`, `naam`, `email`, `is_admin`, `lastlogin`, `lastaction`, `created`, `created_by`, `modified`, `modified_by`, `resetpassword`, `language`, `deleted`, `cms_usergroups_id`, `valid_firstday`, `valid_lastday`) VALUES (100000000,'bf13b44feae208fc808b1d6b2266edb7','BrowserTestUser_Admin','admin@admin.co',0,'0000-00-00 00:00:00','0000-00-00 00:00:00','2019-07-10 08:10:40',1,NULL,NULL,NULL,2,'0000-00-00 00:00:00',100000002,'0000-00-00','0000-00-00'), (100000001,'bf13b44feae208fc808b1d6b2266edb7','BrowserTestUser_Coordinator', 'coordinator@coordinator.co',0,'0000-00-00 00:00:00','0000-00-00 00:00:00','2019-07-10 08:11:08',1,NULL,NULL,NULL,2,'0000-00-00 00:00:00',100000001,'0000-00-00','0000-00-00'), @@ -107,7 +107,7 @@ public function run() (100000011,'bf13b44feae208fc808b1d6b2266edb7','Expired Coordinator', 'expired_coordinator@expired.co',0,'0000-00-00 00:00:00','0000-00-00 00:00:00','2019-07-10 08:14:58',1,NULL,NULL,NULL,2,'0000-00-00 00:00:00',100000001,'2017-04-11','2017-05-28'), (100000012,'bf13b44feae208fc808b1d6b2266edb7','Expired Admin', 'expired_admin@expired.co',0,'0000-00-00 00:00:00','0000-00-00 00:00:00','2019-07-10 08:14:58',1,NULL,NULL,NULL,2,'0000-00-00 00:00:00',100000002,'2017-04-11','2017-05-28');"); - //------------------- locations + // ------------------- locations $this->execute("INSERT INTO `locations` (`id`, `label`, `camp_id`, `visible`, `container_stock`, `is_market`, `is_donated`, `is_lost`, `is_scrap`,`box_state_id`) VALUES (100000000,'TestShop',100000000,0,0,1,0,0,0,5), (100000001,'TestLOST',100000000,0,0,0,0,1,0,2), @@ -117,7 +117,7 @@ public function run() (100000005,'TestDummyLocation',100000001,0,0,1,0,0,0,5), (100000006,'TestSCRAP',100000000,0,0,0,0,0,1,6);"); - //------------------- products + // ------------------- products $this->execute("INSERT INTO `products` (`id`, `name`, `category_id`, `gender_id`, `sizegroup_id`, `camp_id`, `value`, `created`, `created_by`, `modified`, `modified_by`, `maxperadult`, `maxperchild`, `stockincontainer`, `comments`, `deleted`) VALUES (1158,'Jeans',2,1,5,100000000,50,'2019-09-05 13:54:40',1,NULL,NULL,0,0,1,'',NULL), (1159,'T-Shirts',3,2,1,100000000,30,'2019-09-05 13:55:10',1,NULL,NULL,0,0,1,'',NULL), @@ -128,7 +128,7 @@ public function run() (1164,'Rice (1kg)',11,10,7,100000000,25,'2019-09-05 13:57:59',1,NULL,NULL,0,0,1,'',NULL), (1165,'DummyProduct',2,1,5,100000001,50,'2019-09-05 13:54:40',1,NULL,NULL,0,0,1,'',NULL);"); - //------------------- people + // ------------------- people $this->execute("INSERT INTO `people` (`id`,`firstname`,`lastname`,`camp_id`,`container`,`date_of_birth`,`created`, `approvalsigned`, `signaturefield`, `date_of_signature`, `deleted`) VALUES (100000001,'User', 'WithoutTokens',100000000,'001','1980-07-10','2019-09-02',1, NULL,'2019-09-02', '0000-00-00 00:00:00'), (100000002, 'Conor', 'McGregor',100000000,'002','1980-07-10','2019-09-02',1,NULL,'2019-09-02','0000-00-00 00:00:00'), @@ -137,13 +137,13 @@ public function run() (100000005, 'User', 'WithoutApproval',100000000,'004','1978-07-10','2019-09-02',0,NULL,'0000-00-00 00:00:00', '0000-00-00 00:00:00'), (100000006, 'DeactivatedBeneficiary', 'DeactivatedBeneficiary',100000000,'004','1978-07-10','2019-09-02',1,NULL,'2019-09-02', '2019-10-25 11:01:30')"); - //------------------- transactions + // ------------------- transactions $this->execute("INSERT INTO `transactions` (`id`,`people_id`,`product_id`,`count`,`drops`,`transaction_date`, `user_id`) VALUES (100000000, 100000002, 1158, 0 , 2147483647 ,'2019-09-02', 1), (100000001, 100000003, 1161, 0 , 2147483647 ,'2019-09-02', 1), (100000002, 100000004, 1162, 0 , 2147483647 ,'2019-09-02', 1)"); - //------------------- qr + // ------------------- qr $this->execute("INSERT INTO `qr` (`id`, `code`) VALUES (100000000,'093f65e080a295f8076b1c5722a46aa2'), (100000001,'44f683a84163b3523afe57c2e008bc8c'), @@ -152,7 +152,7 @@ public function run() (100000004,'4b382363fa161c111fa9ad2b335ceacd'), (100000005,'b1cf83ae73adfce0d14dbe81b53cb96b');"); - //------------------- stock + // ------------------- stock $this->execute("INSERT INTO `stock` (`id`, `box_id`, `product_id`, `size_id`,`items`,`location_id`,`qr_id`,`comments`,`created`,`created_by`) VALUES (100000000, 328765, 1163, 68, 50, 100000002, 100000000, 'Cypress seed test box', '2015-01-01 11:15:32', 1), (100000001, 235563, 1165, 68, 50, 100000005, 100000001, '50 dummy products', '2019-09-29 18:15:32', 1);"); diff --git a/db/seeds/Demo.php b/db/seeds/Demo.php index cf677481..53c3b038 100644 --- a/db/seeds/Demo.php +++ b/db/seeds/Demo.php @@ -26,12 +26,12 @@ public function run() // to make the seed reproducible $faker->seed(2); - //------------------- library_type + // ------------------- library_type $this->execute("INSERT INTO `library_type` (`id`, `label`, `camp_id`) VALUES (1,'Books',1), (2,'Magazines',1);"); - //------------------- library + // ------------------- library $library = []; for ($i = 1; $i <= 100; ++$i) { $tempdata = [ @@ -47,7 +47,7 @@ public function run() } $this->table('library')->insert($library)->save(); - //------------------- locations + // ------------------- locations $this->execute("INSERT INTO `locations` (`id`, `label`, `camp_id`, `seq`, `visible`, `container_stock`, `is_market`, `is_donated`, `is_lost`, `is_scrap`,`box_state_id`) VALUES (1,'Shop',1,1,0,0,1,0,0,0,5), (2,'LOST',1,2,0,0,0,0,1,0,2), @@ -72,7 +72,7 @@ public function run() (21,'SCRAP',3,21,0,0,0,0,0,1,6), (22,'Stockroom',3,21,1,1,0,0,0,0,1);"); - //------------------- people + // ------------------- people $people = []; $lastparentid = null; $lastlastname = null; @@ -137,7 +137,7 @@ public function run() } $this->table('people')->insert($people)->save(); - //------------------- products + // ------------------- products $this->execute("INSERT INTO `products` (`id`,`name`,`category_id`,`gender_id`,`sizegroup_id`,`camp_id`,`value`,`maxperadult`,`maxperchild`,`stockincontainer`,`comments`,`deleted`) VALUES (1,'Winter Jackets',6,2,1,1,0,0,0,1,'','0000-00-00 00:00:00'), (2,'Winter Jackets',6,1,1,1,0,0,0,1,'','0000-00-00 00:00:00'), @@ -749,7 +749,7 @@ public function run() (608,'WD SOCKS',12,10,6,3,5,0,0,0,'',NULL), (609,'WD BABY CLOTHES',12,10,6,3,20,0,0,0,'',NULL);"); - //------------------- qr + // ------------------- qr $qr = []; for ($i = 1; $i <= 1000; ++$i) { // qr code not unique because faker in Cypress.php intervene @@ -761,7 +761,7 @@ public function run() } $this->table('qr')->insert($qr)->save(); - //------------------- stock + // ------------------- stock // restrict selection of random ids // key is campid $products = ['1' => range(1, 219), '2' => range(220, 414), '3' => range(415, 609)]; @@ -1416,9 +1416,9 @@ public function run() ]; $tempdata['size_id'] = $faker->randomElement($sizes[$tempdata['product_id']]); - //order a few boxes + // order a few boxes $rand_num = $faker->numberBetween($min = 0, $max = 1000); - if (($rand_num < 20)) { + if ($rand_num < 20) { $tempdata['ordered'] = $faker->dateTimeThisYear($max = 'now', $timezone = 'Europe/Athens')->format('Y-m-d'); $tempdata['box_state_id'] = 3; } @@ -1427,7 +1427,7 @@ public function run() } $this->table('stock')->insert($stock)->save(); - //------------------- transactions + // ------------------- transactions $transactions = []; $i = 1; foreach ($people as $person) { diff --git a/db/seeds/DemoUsers.php b/db/seeds/DemoUsers.php index b078678c..e6f8708b 100644 --- a/db/seeds/DemoUsers.php +++ b/db/seeds/DemoUsers.php @@ -26,19 +26,19 @@ public function run() // to make the seed reproducible $faker->seed(2); - //------------------- organisations + // ------------------- organisations $this->execute("INSERT INTO `organisations` (`id`, `label`, `deleted`) VALUES (1,'BoxAid',NULL), (2,'BoxCare',NULL);"); - //------------------- camps + // ------------------- camps $this->execute("INSERT INTO `camps` (`id`,`idcard`,`market`,`name`,`organisation_id`,`schedulebreak`,`schedulebreakduration`,`schedulebreakstart`,`schedulestart`,`schedulestop`,`scheduletimeslot`,`seq`,`adult_age`,`currencyname`,`cyclestart`,`daystokeepdeletedpersons`,`delete_inactive_users`,`deleted`,`dropcapadult`,`dropcapchild`,`dropsperadult`,`dropsperchild`,`extraportion`,`familyidentifier`,`resettokens`) VALUES (1,0,1,'Lesvos',1,'0','1','2019-08-27 13:00:00','2019-08-27 11:00:00','2019-08-27 17:00:00','0.5',1,15,'Tokens','2019-01-01 00:00:00',9999,8,NULL,99999,99999,'100','100',0,'Refugee / Case ID',0), (2,0,0,'Thessaloniki',2,'0','1','13:00','9:00','15:00','0.25',2,15,'points','2019-11-05 09:13:11',9999,9999,NULL,99999,99999,'100','50',0,'Family ID',1), (3,0,1,'Samos',2,'0','1.5','2019-10-14 13:30:00','2019-10-14 10:30:00','2019-10-14 17:00:00','0.5',4,0,'Tokens','2019-01-06 22:18:10',60,9999,NULL,500,300,'150','130',1,'Household',0), (4,0,0,'Athens',2,'0','1','13:00','9:00','15:00','0.25',5,15,'points','2019-11-05 09:13:11',9999,9999,NULL,99999,99999,'100','50',0,'Family ID',1);"); - //------------------- cms_functions_camps + // ------------------- cms_functions_camps $this->execute('INSERT INTO `cms_functions_camps` (`cms_functions_id`, `camps_id`) VALUES (67,1), (87,1), @@ -92,7 +92,7 @@ public function run() (160,4), (162,4);'); - //------------------- cms_usergroups + // ------------------- cms_usergroups $this->execute("INSERT INTO `cms_usergroups` (`id`, `label`, `organisation_id`, `userlevel`) VALUES (1,'Head of Operations',1,1), (2,'Coordinator',1,2), @@ -113,7 +113,7 @@ public function run() (20,'Base Athens - Volunteer (Free Shop)',2,2), (21,'Base Athens - Label Creation',2,2);"); - //------------------- cms_usergroups_camps + // ------------------- cms_usergroups_camps $this->execute('INSERT INTO `cms_usergroups_camps` (`cms_usergroups_id`, `camp_id`) VALUES (1,1), (2,1), @@ -138,7 +138,7 @@ public function run() (20,4), (21,4);'); - //------------------- cms_usergroups_functions + // ------------------- cms_usergroups_functions $this->execute('INSERT INTO `cms_usergroups_functions` (`cms_functions_id`, `cms_usergroups_id`) VALUES (43,1), (67,1), diff --git a/db/seeds/Minimal.php b/db/seeds/Minimal.php index 6e2e0173..771dddcd 100644 --- a/db/seeds/Minimal.php +++ b/db/seeds/Minimal.php @@ -20,7 +20,7 @@ public function run() // and replacement pattern: // $this->execute("$1");\n - //------------------- cms_functions + // ------------------- cms_functions $this->execute('SET FOREIGN_KEY_CHECKS=0;'); $this->execute("INSERT INTO `cms_functions` (`id`,`parent_id`,`title_en`,`include`,`seq`,`alert`,`adminonly`,`visible`,`allusers`,`allcamps`) VALUES (35,NULL,'Free Shop','',3,0,0,1,0,0), @@ -73,7 +73,7 @@ public function run() (162,42,'Manage tags','tags',6,0,0,1,0,0);"); $this->execute('SET FOREIGN_KEY_CHECKS=1;'); - //------------------- cms_settings + // ------------------- cms_settings $this->execute("INSERT INTO `cms_settings` (`id`, `category_id`, `type`, `code`, `description`, `options`, `value`, `hidden`, `created`, `created_by`, `modified`, `modified_by`) VALUES (83,1,'select','cms_language','Language used for CMS interface','en=English','en',1,NULL,NULL,NULL,NULL), (86,1,'text','mail_sender','Sender address for e-mails sent by Boxtribute','','hello@boxtribute.org',1,NULL,NULL,NULL,NULL), @@ -82,13 +82,13 @@ public function run() (137,1,'text','dailyroutine','Last date the daily routine did run','','2019-06-26',1,NULL,NULL,NULL,NULL), (138,1,'text','installed','Date and time of installation and first run','','2016-23-11 9:00:00',1,NULL,NULL,NULL,NULL);"); - //------------------- cms_usergroups_levels + // ------------------- cms_usergroups_levels $this->execute("INSERT INTO `cms_usergroups_levels` (`id`, `level`, `label`, `shortlabel`) VALUES (1,100,'Admin user - in charge of an organisation','Admin'), (2,10,'Coordinator - in charge of a base','Coordinator'), (3,5,'User - regular volunteer/employee','User');"); - //------------------- languages + // ------------------- languages $this->execute("INSERT INTO `languages` (`id`, `visible`, `code`, `locale`, `name`, `strftime_dateformat`, `smarty_dateformat`, `seq`, `rtl`) VALUES (1,0,'nl','nl_NL','Dutch','%A %e %B %Y','%A %e %B %Y',1,0), (2,1,'en','en_GB','English','%A %B %e %Y','%A %B %e %Y',2,0), @@ -106,11 +106,11 @@ public function run() (15,1,NULL,NULL,'Somali',NULL,NULL,15,0), (16,1,NULL,NULL,'Dari',NULL,NULL,16,0);"); - //------------------- cms_users + // ------------------- cms_users $this->execute("INSERT INTO `cms_users` (`id`, `pass`, `naam`, `email`, `is_admin`, `resetpassword`, `language`, `deleted`, `cms_usergroups_id`, `valid_firstday`, `valid_lastday`) VALUES (1,'bf13b44feae208fc808b1d6b2266edb7','some admin','some.admin@boxtribute.org',1,'',2,'0000-00-00 00:00:00',NULL,NULL,NULL);"); - //------------------- genders + // ------------------- genders $this->execute("INSERT INTO `genders` (`id`,`label`,`shortlabel`,`seq`,`male`,`female`,`adult`,`child`,`baby`,`color`) VALUES (1,'Female','Female',1,0,1,1,0,0,'0'), (2,'Male','Male',2,1,0,1,0,0,'0'), @@ -123,7 +123,7 @@ public function run() (12,'Teen Girl','Girl',4,0,1,1,0,0,'0'), (13,'Teen Boy','Boy',5,1,0,1,0,0,'0');"); - //------------------- numbers + // ------------------- numbers $this->execute("INSERT INTO `numbers` (`value`, `label`) VALUES (0,'none'), (1,'one'), @@ -137,7 +137,7 @@ public function run() (9,'nine'), (10,'ten');"); - //------------------- product_categories + // ------------------- product_categories $this->execute('SET FOREIGN_KEY_CHECKS=0;'); $this->execute("INSERT INTO `product_categories` (`id`, `label`, `seq`, `parent_id`) VALUES (1,'Underwear / Nightwear',11,12), @@ -160,7 +160,7 @@ public function run() (20,'Shelter',44,NULL);"); $this->execute('SET FOREIGN_KEY_CHECKS=1;'); - //------------------- sizegroup + // ------------------- sizegroup $this->execute("INSERT INTO `sizegroup` (`id`, `label`, `seq`) VALUES (1,'XS, S, M, L, XL',1), (2,'Baby by month (0-6, 7-12, 13-18, 19-24)',20), @@ -183,7 +183,7 @@ public function run() (23,'Children by year (2-3, 4-5, 6-7, 8-9, 10-11, 12-13, 14-15)',11), (24,'Children by year (individual years)', 12);"); - //------------------- sizes + // ------------------- sizes $this->execute("INSERT INTO `sizes` (`id`,`label`,`sizegroup_id`,`seq`) VALUES (1,'S',1,1), (2,'M',1,2), @@ -305,7 +305,7 @@ public function run() (162,'15 years',24,223), (163,'All ages',24,234);"); - //------------------- tipofday + // ------------------- tipofday $this->execute("INSERT INTO `tipofday` (`id`, `title`, `content`) VALUES (1,'Sorting lists','Most lists can be sorted anyway you like. Just click on the column title to sort the table on that column. Clicking another time on the same column will reverse the sort order.'), (2,'Undo a purchase','If a customer decides not to buy something after you made the purchase: check the item in the list of purchases and hit the red \\'Delete\\' button.'), @@ -314,12 +314,12 @@ public function run() (5,'Quick purchase','If you want to quickly submit a form you can simply use the \\'cmd + enter\\' or \\'ctrl + enter\\' shortcut!'), (6,'Sorting','Did you know you that in a list you can sort multiple columns simultaneously by holding down the Shift key and clicking a second, third or even fourth column header!');"); - //------------------- translate_categories + // ------------------- translate_categories $this->execute("INSERT INTO `translate_categories` (`id`, `name`) VALUES (13,'text'), (0,'something else')"); - //------------------- translate + // ------------------- translate $this->execute("INSERT INTO `translate` (`id`, `category_id`, `type`, `code`, `description`, `nl`, `en`, `fr`, `hidden`, `created`, `created_by`, `modified`, `modified_by`, `deleted`) VALUES (485,13,'text','cms_login_email',NULL,'e-mailadres','E-mail address','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'), (486,13,'text','cms_login_password','','Wachtwoord','Password','',1,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'), @@ -502,7 +502,7 @@ public function run() (912,0,'textarea','workshop-rules','Rules for workshop access','','Workshop access is only available for beneficiaries of Nea Kavala. / You can access the workshop when you have succesfully finished the training and have signed the contract with us / To get access to the workshop and use tools you show us this card, you will get it back after returning the tools and leaving the workshop / You are responsible for your own safety and to return all tools in a clean and good state / You have to be 16 years old minimum. / Always return all the tools before closing time of the workshop (17:00) / If you not follow these rules, we can ban you for two weeks and if you repeatedly not follow the rules we can ban you permanently.','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'), (913,0,'text','site_name','','','Boxtribute','',0,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00');"); - //------------------- units + // ------------------- units $this->execute("INSERT INTO `units` (`id`, `label`, `longlabel`, `seq`, `created`, `created_by`, `modified`, `modified_by`) VALUES (1,'liter','liter',3,NULL,NULL,NULL,NULL), (2,'kg','kilogram',2,NULL,NULL,NULL,NULL), diff --git a/docker-compose.yml b/docker-compose.yml index f5eff256..2da876fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.1' +version: '3.4' services: db_mysql: @@ -13,20 +13,20 @@ services: ports: - "9906:3306" web: - build: .docker/php + build: + context: . + target: debug depends_on: - db_mysql volumes: - .:/var/www/html/ - - ./.docker/php/dropapp.conf:/etc/apache2/sites-available/000-default.conf - ./.docker/php/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - ./.docker/php/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini ports: - "8100:80" environment: - # WARNING: you do *not* want these environment variables set - # in a production environment, as they enable remote - # debugging + PORT: 80 + DISABLE_GCLOUD: "true" GOOGLE_CLOUD_PROJECT: DUMMY_ID stdin_open: true tty: true diff --git a/gcloud-entry.php b/gcloud-entry.php index 2301c01c..d9927eff 100644 --- a/gcloud-entry.php +++ b/gcloud-entry.php @@ -2,9 +2,6 @@ define('LOADED_VIA_SINGLE_ENTRY_POINT', true); -// config for GCloud error reporting taken from https://github.com/GoogleCloudPlatform/php-docs-samples/tree/6609166f71b1049f45360480963c2327b00b7959/appengine/standard/errorreporting -require_once __DIR__.'/vendor/google/cloud-error-reporting/src/prepend.php'; - require_once 'vendor/autoload.php'; // load configuration file require_once 'library/config.php'; @@ -22,6 +19,8 @@ // The GAE environment requires a single entry point, so we're // doing basic routing from here +// Cloud Run does not, but keeping for consistency for now + use OpenCensus\Trace\Tracer; // permanent redirect for old market.drapenihavet.no url @@ -48,45 +47,45 @@ function () use ($parsedUrl) { global $rolesToActions, $menusToActions; switch ($parsedUrl) { - case '/': - case '/index.php': - require 'index.php'; + case '/': + case '/index.php': + require 'index.php'; - break; - // old path of QR-codes - case '/flip/scan.php': - require 'mobile.php'; + break; + // old path of QR-codes + case '/flip/scan.php': + require 'mobile.php'; - break; + break; - case '/ajax.php': - case '/mobile.php': - case '/cypress-session.php': - case '/pdf/workshopcard.php': - case '/pdf/bicyclecard.php': - case '/pdf/idcard.php': - case '/pdf/qr.php': - case '/pdf/dryfood.php': - case '/cron/dailyroutine.php': - case '/cron/reseed-db.php': - case '/cron/reseed-auth0.php': - case '/cron/reseed-roles-auth0.php': - case '/fake-error.php': - require substr($parsedUrl, 1); // trim / + case '/ajax.php': + case '/mobile.php': + case '/cypress-session.php': + case '/pdf/workshopcard.php': + case '/pdf/bicyclecard.php': + case '/pdf/idcard.php': + case '/pdf/qr.php': + case '/pdf/dryfood.php': + case '/cron/dailyroutine.php': + case '/cron/reseed-db.php': + case '/cron/reseed-auth0.php': + case '/cron/reseed-roles-auth0.php': + case '/fake-error.php': + require substr($parsedUrl, 1); // trim / - break; + break; - case '/ping': - http_response_code(200); + case '/ping': + http_response_code(200); - exit('pong'); + exit('pong'); - break; + break; - default: - http_response_code(404); + default: + http_response_code(404); - exit('Not Found'); + exit('Not Found'); } } ); diff --git a/include/borrow.php b/include/borrow.php index f0910e70..7bbd0975 100644 --- a/include/borrow.php +++ b/include/borrow.php @@ -130,5 +130,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/borrowhistory.php b/include/borrowhistory.php index 63ce364d..e6f5e577 100644 --- a/include/borrowhistory.php +++ b/include/borrowhistory.php @@ -40,5 +40,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/camps.php b/include/camps.php index 585a1177..a8a3b884 100644 --- a/include/camps.php +++ b/include/camps.php @@ -8,7 +8,7 @@ $cmsmain->assign('title', 'Bases'); - $data = getlistdata('SELECT *, IF('.(intval($_SESSION['camp']['id'])).'=id,1,0) AS preventdelete FROM camps WHERE organisation_id = '.intval($_SESSION['organisation']['id'])); + $data = getlistdata('SELECT *, IF('.intval($_SESSION['camp']['id']).'=id,1,0) AS preventdelete FROM camps WHERE organisation_id = '.intval($_SESSION['organisation']['id'])); addcolumn('text', 'Name', 'name'); diff --git a/include/check_out.php b/include/check_out.php index 8f6b424f..db2b7074 100644 --- a/include/check_out.php +++ b/include/check_out.php @@ -34,7 +34,7 @@ addfield('select', 'Product', 'product_id', ['placeholder' => 'Type to search', 'required' => true, 'multiple' => false, 'query' => 'SELECT p.id AS value, CONCAT(p.name, " " ,IFNULL(g.label,""), " (",p.value," '.$_SESSION['camp']['currencyname'].')") AS label, p.value as price FROM products AS p LEFT OUTER JOIN genders AS g ON p.gender_id = g.id WHERE (NOT p.deleted OR p.deleted IS NULL) AND p.camp_id = '.$_SESSION['camp']['id'].($_SESSION['camp']['separateshopandwhproducts'] ? ' AND p.stockincontainer' : '').' ORDER BY name']); addfield('number', 'Number', 'count', ['required' => true, 'width' => 2, 'min' => 1, 'testid' => 'productQuantityInput']); addfield('custom', '', ''); - //addfield('text','Note','description'); + // addfield('text','Note','description'); addfield('line'); addfield('custom', '', '', ['aside' => true, 'asidetop' => true]); @@ -62,7 +62,7 @@ echo json_encode($return); - exit(); + exit; } // verify acces if data of a person is requested @@ -99,7 +99,7 @@ echo json_encode($return); - exit(); + exit; } $ajaxform = new Zmarty(); diff --git a/include/cms_functions.php b/include/cms_functions.php index c47d62ff..52154490 100644 --- a/include/cms_functions.php +++ b/include/cms_functions.php @@ -67,5 +67,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/cms_functions_edit.php b/include/cms_functions_edit.php index b7a216e1..dcac9877 100644 --- a/include/cms_functions_edit.php +++ b/include/cms_functions_edit.php @@ -4,7 +4,7 @@ if ($_POST) { $handler = new formHandler($table); - //$handler->debug = true; + // $handler->debug = true; $keys = ['title_en', 'include', 'parent_id', 'adminonly', 'visible', 'allusers', 'allcamps']; $handler->savePost($keys, ['parent_id']); diff --git a/include/cms_profile.php b/include/cms_profile.php index 5af34508..fb27721a 100644 --- a/include/cms_profile.php +++ b/include/cms_profile.php @@ -54,8 +54,8 @@ addfield('email', $translate['cms_users_email'], 'email', ['required' => true, 'testid' => 'user_email']); addfield('password', $translate['cms_users_password'], 'pass', ['repeat' => true, 'pwcheck' => true, 'testid' => 'user_pass']); - //addfield('line'); - //addfield('select',$translate['cms_settings_language'],'language',array('query'=>'SELECT id AS value, name AS label FROM languages WHERE visible ORDER BY seq')); + // addfield('line'); + // addfield('select',$translate['cms_settings_language'],'language',array('query'=>'SELECT id AS value, name AS label FROM languages WHERE visible ORDER BY seq')); addfield('delete_user', 'Deactivate', '', ['aside' => true]); addfield('created', 'Created', 'created', ['aside' => true]); diff --git a/include/cms_settings.php b/include/cms_settings.php index a496f52a..f48c482f 100644 --- a/include/cms_settings.php +++ b/include/cms_settings.php @@ -74,5 +74,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/cms_settings_edit.php b/include/cms_settings_edit.php index d857807b..bf4ca8b1 100644 --- a/include/cms_settings_edit.php +++ b/include/cms_settings_edit.php @@ -5,10 +5,10 @@ if ($_POST) { $hasBilanguage = db_fieldexists($table, 'description_nl'); - //echo $_POST['value']; + // echo $_POST['value']; $handler = new formHandler($table); - //$handler->debug = true; + // $handler->debug = true; if ($hasBilanguage) { $keys = ['description_nl', 'description_en', 'code', 'value', 'type', 'options']; @@ -55,7 +55,7 @@ ['value' => 'checkbox', 'label' => $translate['cms_field_checkbox']], ['value' => 'select', 'label' => $translate['cms_field_select']], ], 'onchange' => 'if(this.options[this.selectedIndex].value=="select") $("#div_options").removeClass("hidden"); else $("#div_options").addClass("hidden");'] -//console.log($("#field_type").html); + // console.log($("#field_type").html); ); // alleen voor type = select addfield('text', $translate['cms_settings_options'], 'options', ['tooltip' => 'Vul de mogelijke keuzes in als volgt: waarde=Label,waarde2=Label2,waarde3=Label3', 'hidden' => 'select' != $data['type']]); @@ -73,8 +73,8 @@ } else { addfield('text', $translate['cms_settings_description'], 'description', ['readonly' => true]); } - //addfield('info','','descriptionlabel'); - //addfield('hidden','','description'); + // addfield('info','','descriptionlabel'); + // addfield('hidden','','description'); addfield('hidden', '', 'type'); addfield('hidden', '', 'code'); addfield('hidden', '', 'hidden'); diff --git a/include/cms_translate.php b/include/cms_translate.php index 47edb6b9..7e56b8b2 100644 --- a/include/cms_translate.php +++ b/include/cms_translate.php @@ -9,7 +9,7 @@ $cmsmain->assign('title', $translate['cms_translates']); listsetting('search', ['en', 'code', 'description']); - //listfilter(array('label'=>'Filter op categorie','query'=>'SELECT c.id AS value, c.name AS label FROM translate_categories AS c, translate AS t WHERE t.category_id = c.id GROUP BY c.id ORDER BY c.id','filter'=>'category_id')); + // listfilter(array('label'=>'Filter op categorie','query'=>'SELECT c.id AS value, c.name AS label FROM translate_categories AS c, translate AS t WHERE t.category_id = c.id GROUP BY c.id ORDER BY c.id','filter'=>'category_id')); $hasdescription = db_fieldexists($table, 'description'); @@ -96,5 +96,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/cms_translate_edit.php b/include/cms_translate_edit.php index dbe6f47a..b2ff34e6 100644 --- a/include/cms_translate_edit.php +++ b/include/cms_translate_edit.php @@ -5,7 +5,7 @@ if ($_POST) { $handler = new formHandler($table); - //$handler->debug = true; + // $handler->debug = true; $savekeys = ['code', 'hidden', 'category_id', 'type']; if ($hasdescription) { @@ -46,7 +46,7 @@ ['value' => 'textarea', 'label' => $translate['cms_field_textarea']], ]] ); - //addfield('select',$translate['cms_settings_category'],'category_id',array('required'=>true, 'width'=>5,'query'=>'SELECT id AS value, name AS label FROM translate_categories ORDER BY id')); + // addfield('select',$translate['cms_settings_category'],'category_id',array('required'=>true, 'width'=>5,'query'=>'SELECT id AS value, name AS label FROM translate_categories ORDER BY id')); addfield('checkbox', $translate['cms_settings_hidden'], 'hidden'); } else { addfield('hidden', '', 'description'); diff --git a/include/cms_usergroups.php b/include/cms_usergroups.php index 0f886454..b21b9bd6 100644 --- a/include/cms_usergroups.php +++ b/include/cms_usergroups.php @@ -51,7 +51,7 @@ listsetting('allowselectall', false); listsetting('allowselect', false); // disable usergroup in line with new Boxtribute 2.0 - //listsetting('add', 'Add a User Group'); + // listsetting('add', 'Add a User Group'); $cmsmain->assign('data', $data); $cmsmain->assign('listconfig', $listconfig); @@ -59,45 +59,45 @@ $cmsmain->assign('include', 'cms_list.tpl'); } else { switch ($_POST['do']) { - case 'move': - // $ids = json_decode($_POST['ids']); - // list($success, $message, $redirect) = listMove($table, $ids); + case 'move': + // $ids = json_decode($_POST['ids']); + // list($success, $message, $redirect) = listMove($table, $ids); - break; + break; - case 'delete': - $ids = explode(',', $_POST['ids']); - //list($success, $message, $redirect) = listDelete($table, $ids, false, ['cms_users']); - // disabling delete of usergroups according this trello card https://trello.com/c/HgKoMDov - $success = false; - $message = 'User Groups cannot be deleted'; + case 'delete': + $ids = explode(',', $_POST['ids']); + // list($success, $message, $redirect) = listDelete($table, $ids, false, ['cms_users']); + // disabling delete of usergroups according this trello card https://trello.com/c/HgKoMDov + $success = false; + $message = 'User Groups cannot be deleted'; - break; + break; - case 'copy': - // $ids = explode(',', $_POST['ids']); - // list($success, $message, $redirect) = listCopy($table, $ids, 'menutitle'); + case 'copy': + // $ids = explode(',', $_POST['ids']); + // list($success, $message, $redirect) = listCopy($table, $ids, 'menutitle'); - break; + break; - case 'hide': - // $ids = explode(',', $_POST['ids']); - // list($success, $message, $redirect) = listShowHide($table, $ids, 0); + case 'hide': + // $ids = explode(',', $_POST['ids']); + // list($success, $message, $redirect) = listShowHide($table, $ids, 0); - break; + break; - case 'show': - // $ids = explode(',', $_POST['ids']); - // list($success, $message, $redirect) = listShowHide($table, $ids, 1); + case 'show': + // $ids = explode(',', $_POST['ids']); + // list($success, $message, $redirect) = listShowHide($table, $ids, 1); - break; - } + break; + } $return = ['success' => $success, 'message' => $message, 'redirect' => $redirect]; echo json_encode($return); - exit(); + exit; } } else { throw new Exception('You do not have access to this menu. Please ask your admin to change this!'); diff --git a/include/cms_users_handle_ajax_operations.php b/include/cms_users_handle_ajax_operations.php index 46e8076c..4c7f1f01 100644 --- a/include/cms_users_handle_ajax_operations.php +++ b/include/cms_users_handle_ajax_operations.php @@ -96,5 +96,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/container-stock_edit.php b/include/container-stock_edit.php index 740d043d..fae705ea 100644 --- a/include/container-stock_edit.php +++ b/include/container-stock_edit.php @@ -177,5 +177,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/downloads.php b/include/downloads.php index d35d2da7..6322238c 100644 --- a/include/downloads.php +++ b/include/downloads.php @@ -16,7 +16,7 @@ listsetting('allowdelete', false); listsetting('allowselect', false); listsetting('allowsort', true); - //listsetting('sortlist','[[3,0]]'); + // listsetting('sortlist','[[3,0]]'); addcolumn('text', 'Bestand', 'filename', ['breakall' => true]); addcolumn('text', 'Aantal downloads', 'downloads'); @@ -63,5 +63,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/fancygraphs.php b/include/fancygraphs.php index 15df7dc9..d06592a8 100644 --- a/include/fancygraphs.php +++ b/include/fancygraphs.php @@ -31,17 +31,17 @@ ksort($data['familysize']); - $data['tip'] = db_row('SELECT * FROM tipofday ORDER BY RAND()'); - $data['families'] = db_value('SELECT COUNT(id) FROM people AS p WHERE visible AND parent_id IS NULL AND NOT deleted AND p.camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); - $data['residents'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); - $data['notregistered'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND notregistered', ['camp_id' => $_SESSION['camp']['id']]); - $data['residentscamp'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND LEFT(container,2) != "PK"', ['camp_id' => $_SESSION['camp']['id']]); - $data['residentsoutside'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND LEFT(container,2) = "PK"', ['camp_id' => $_SESSION['camp']['id']]); - $data['residents'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); - $data['totalmen'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND gender = "M" AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); - $data['menperc'] = $data['totalmen'] / $data['residents'] * 100; - $data['totalwomen'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND gender = "F" AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); - $data['womenperc'] = $data['totalwomen'] / $data['residents'] * 100; + $data['tip'] = db_row('SELECT * FROM tipofday ORDER BY RAND()'); + $data['families'] = db_value('SELECT COUNT(id) FROM people AS p WHERE visible AND parent_id IS NULL AND NOT deleted AND p.camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); + $data['residents'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); + $data['notregistered'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND notregistered', ['camp_id' => $_SESSION['camp']['id']]); + $data['residentscamp'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND LEFT(container,2) != "PK"', ['camp_id' => $_SESSION['camp']['id']]); + $data['residentsoutside'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id AND LEFT(container,2) = "PK"', ['camp_id' => $_SESSION['camp']['id']]); + $data['residents'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); + $data['totalmen'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND gender = "M" AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); + $data['menperc'] = $data['totalmen'] / $data['residents'] * 100; + $data['totalwomen'] = db_value('SELECT COUNT(id) FROM people WHERE visible AND NOT deleted AND gender = "F" AND camp_id = :camp_id', ['camp_id' => $_SESSION['camp']['id']]); + $data['womenperc'] = $data['totalwomen'] / $data['residents'] * 100; $data['adults'] = db_value('SELECT COUNT(id) FROM people WHERE camp_id = :camp_id AND visible AND NOT deleted AND DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), date_of_birth)), "%Y")+0 >= '.$_SESSION['camp']['adult_age'], ['camp_id' => $_SESSION['camp']['id']]); $data['children'] = db_value('SELECT COUNT(id) FROM people WHERE camp_id = :camp_id AND visible AND NOT deleted AND DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), date_of_birth)), "%Y")+0 < '.$_SESSION['camp']['adult_age'], ['camp_id' => $_SESSION['camp']['id']]); diff --git a/include/give.php b/include/give.php index 35685c4b..242af36f 100644 --- a/include/give.php +++ b/include/give.php @@ -52,7 +52,7 @@ addfield('text', 'Comments', 'description'); - //addfield('checkbox','Zichtbaar','visible',array('aside'=>true)); + // addfield('checkbox','Zichtbaar','visible',array('aside'=>true)); addfield('line', '', '', ['aside' => true]); addfield('created', 'Created', 'created', ['aside' => true]); diff --git a/include/give2all.php b/include/give2all.php index b7eff4fd..75825305 100644 --- a/include/give2all.php +++ b/include/give2all.php @@ -94,14 +94,14 @@ addfield('text', 'Give '.ucwords($_SESSION['camp']['currencyname']).' per adult', 'dropsadult', ['required' => true]); addfield('text', 'Give '.ucwords($_SESSION['camp']['currencyname']).' per child', 'dropschild', ['required' => true]); -// $data['startration'] = 1; -// addfield('checkbox','Reset ration period','startration'); + // $data['startration'] = 1; + // addfield('checkbox','Reset ration period','startration'); addfield('line', '', ''); addfield('text', 'Description', 'description'); - //addfield('checkbox','Zichtbaar','visible',array('aside'=>true)); - //addfield('line','','',array('aside'=>true)); - //addfield('created','Created','created',array('aside'=>true)); + // addfield('checkbox','Zichtbaar','visible',array('aside'=>true)); + // addfield('line','','',array('aside'=>true)); + // addfield('created','Created','created',array('aside'=>true)); // place the form elements and data in the template $cmsmain->assign('data', $data); diff --git a/include/library.php b/include/library.php index 2d6d9024..1ce8803e 100644 --- a/include/library.php +++ b/include/library.php @@ -83,5 +83,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/library_inventory.php b/include/library_inventory.php index 061df6ea..dceb0641 100644 --- a/include/library_inventory.php +++ b/include/library_inventory.php @@ -87,5 +87,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/locations.php b/include/locations.php index d04e614d..25428aae 100644 --- a/include/locations.php +++ b/include/locations.php @@ -8,7 +8,7 @@ throw new Exception('The list of locations is not available when there is no camp selected'); } - $is_admin = ($_SESSION['user']['is_admin']); + $is_admin = $_SESSION['user']['is_admin']; initlist(); @@ -83,5 +83,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/locations_edit.php b/include/locations_edit.php index bf4096ab..62c494df 100644 --- a/include/locations_edit.php +++ b/include/locations_edit.php @@ -2,13 +2,13 @@ $table = 'locations'; $action = 'locations_edit'; - $is_admin = ($_SESSION['user']['is_admin']); + $is_admin = $_SESSION['user']['is_admin']; if ($_POST) { // check if you have access to the location you want to update verify_campaccess_location($_POST['id']); - //Prepare POST + // Prepare POST $_POST['visible'] = !$_POST['outgoing']; $_POST['camp_id'] = $_SESSION['camp']['id']; diff --git a/include/market_schedule.php b/include/market_schedule.php index 34ed371c..9bb6f4dc 100644 --- a/include/market_schedule.php +++ b/include/market_schedule.php @@ -73,16 +73,16 @@ break; } - //$slots[$date][floor($time).":".$minutes]['displaytime'] = ($time>12.5?floor($time)-12:floor($time)).":".$minutes.($time>12.5?' pm':' am'); + // $slots[$date][floor($time).":".$minutes]['displaytime'] = ($time>12.5?floor($time)-12:floor($time)).":".$minutes.($time>12.5?' pm':' am'); if (!$_POST['lunchbreak'] || ($time < $_POST['lunchtime'] || $time >= ($_POST['lunchtime'] + $_POST['lunchduration'][0]))) { $slots[$date][floor($time).':'.$minutes]['displaytime'] = ($time > 12.5 ? floor($time) - 12 : floor($time)).':'.$minutes.($time > 12.5 ? ' pm' : ' am'); $slots[$date][floor($time).':'.$minutes]['count'] = 0; $slots[$date][floor($time).':'.$minutes]['containers'] = []; - /* - $slots[$date][floor($time).":".($time-floor($time)?'30':'00')]['count'] = 0; - $slots[$date][floor($time).":".($time-floor($time)?'30':'00')]['containers'] = ''; - */ + /* + $slots[$date][floor($time).":".($time-floor($time)?'30':'00')]['count'] = 0; + $slots[$date][floor($time).":".($time-floor($time)?'30':'00')]['containers'] = ''; + */ } else { if (!$lunch) { $slots[$date][floor($time).':'.$minutes]['lunch'] = true; diff --git a/include/people.php b/include/people.php index 496062fa..7e94e722 100644 --- a/include/people.php +++ b/include/people.php @@ -3,7 +3,7 @@ use OpenCensus\Trace\Tracer; Tracer::inSpan( - ['name' => ('include/people.php')], + ['name' => 'include/people.php'], function () use ($action, &$cmsmain) { global $settings, $table, $listconfig, $listdata; @@ -209,7 +209,7 @@ function () use ($action, &$cmsmain) { $daysinactive = db_value('SELECT delete_inactive_users/2 FROM camps WHERE id = '.$_SESSION['camp']['id']); Tracer::inSpan( - ['name' => ('include/people.php:inactive')], + ['name' => 'include/people.php:inactive'], function () use (&$data, $daysinactive) { global $listconfig; @@ -236,7 +236,7 @@ function () use (&$data, $daysinactive) { ); Tracer::inSpan( - ['name' => ('include/people.php:approvalsigned_volunteer_unregistered')], + ['name' => 'include/people.php:approvalsigned_volunteer_unregistered'], function () use (&$data) { foreach ($data as $key => $value) { if (0 == $data[$key]['level'] && !$data[$key]['approvalsigned']) { @@ -247,7 +247,7 @@ function () use (&$data) { ); Tracer::inSpan( - ['name' => ('include/people.php:idcard')], + ['name' => 'include/people.php:idcard'], function () use (&$data) { global $settings; @@ -261,7 +261,7 @@ function () use (&$data) { ); Tracer::inSpan( - ['name' => ('include/people.php:idcard')], + ['name' => 'include/people.php:idcard'], function () use (&$data) { foreach ($data as $key => $value) { if ($data[$key]['taglabels']) { @@ -276,7 +276,7 @@ function () use (&$data) { ); Tracer::inSpan( - ['name' => ('people.php:addtemplatedata')], + ['name' => 'people.php:addtemplatedata'], function () use ($cmsmain, $data) { global $listdata, $listdata, $listconfig; @@ -304,277 +304,277 @@ function () use ($cmsmain, $data) { $success = false; } else { switch ($_POST['do']) { - case 'merge': - $ids = explode(',', $_POST['ids']); - foreach ($ids as $key => $value) { - if (db_value('SELECT parent_id FROM people WHERE id = :id', ['id' => $value])) { - $containsmembers = true; - } - } - if ($containsmembers) { - $message = 'Please select only individuals or family heads to merge'; - $success = false; - } elseif (1 == count($ids)) { - $message = 'Please select more than one person to merge them into a family'; - $success = false; - } else { - $oldest = db_value('SELECT id FROM people WHERE id IN ('.$_POST['ids'].') ORDER BY date_of_birth ASC LIMIT 1'); - $extradrops = db_value('SELECT SUM(drops) FROM transactions WHERE people_id IN ('.$_POST['ids'].') AND people_id != :oldest', ['oldest' => $oldest]); - // Transaction block added over update queriesTransaction block added over update and insert queries - db_transaction(function () use ($ids, $oldest) { - foreach ($ids as $id) { - if ($id != $oldest) { - db_query('UPDATE people SET parent_id = :oldest WHERE id = :id', ['oldest' => $oldest, 'id' => $id]); - $drops = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $id]); - db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$id.', -'.intval($drops).', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].')'); + case 'merge': + $ids = explode(',', $_POST['ids']); + foreach ($ids as $key => $value) { + if (db_value('SELECT parent_id FROM people WHERE id = :id', ['id' => $value])) { + $containsmembers = true; } } - }); - db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$oldest.', '.intval($extradrops).', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].')'); - $success = true; - $message = 'The merge has be successfully applied'; - $redirect = true; - correctchildren(); - } + if ($containsmembers) { + $message = 'Please select only individuals or family heads to merge'; + $success = false; + } elseif (1 == count($ids)) { + $message = 'Please select more than one person to merge them into a family'; + $success = false; + } else { + $oldest = db_value('SELECT id FROM people WHERE id IN ('.$_POST['ids'].') ORDER BY date_of_birth ASC LIMIT 1'); + $extradrops = db_value('SELECT SUM(drops) FROM transactions WHERE people_id IN ('.$_POST['ids'].') AND people_id != :oldest', ['oldest' => $oldest]); + // Transaction block added over update queriesTransaction block added over update and insert queries + db_transaction(function () use ($ids, $oldest) { + foreach ($ids as $id) { + if ($id != $oldest) { + db_query('UPDATE people SET parent_id = :oldest WHERE id = :id', ['oldest' => $oldest, 'id' => $id]); + $drops = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $id]); + db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$id.', -'.intval($drops).', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].')'); + } + } + }); + db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$oldest.', '.intval($extradrops).', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].')'); + $success = true; + $message = 'The merge has be successfully applied'; + $redirect = true; + correctchildren(); + } - break; + break; - case 'detach': - $ids = explode(',', $_POST['ids']); - foreach ($ids as $key => $value) { - if (!db_value('SELECT parent_id FROM people WHERE id = :id', ['id' => $value])) { - $containsmembers = true; - } - } - if ($containsmembers) { - $message = 'Please select only members of a family, not family heads'; - $success = false; - } else { - // Transaction block added over update queries - db_transaction(function () use ($ids) { - foreach ($ids as $id) { - db_query('UPDATE people SET parent_id = NULL WHERE id = :id', ['id' => $id]); + case 'detach': + $ids = explode(',', $_POST['ids']); + foreach ($ids as $key => $value) { + if (!db_value('SELECT parent_id FROM people WHERE id = :id', ['id' => $value])) { + $containsmembers = true; + } + } + if ($containsmembers) { + $message = 'Please select only members of a family, not family heads'; + $success = false; + } else { + // Transaction block added over update queries + db_transaction(function () use ($ids) { + foreach ($ids as $id) { + db_query('UPDATE people SET parent_id = NULL WHERE id = :id', ['id' => $id]); + } + }); + $redirect = true; + $success = true; + $message = ($success) ? 'Selected people have been detached' : 'Something went wronge'; } - }); - $redirect = true; - $success = true; - $message = ($success) ? 'Selected people have been detached' : 'Something went wronge'; - } - break; + break; - case 'give': - $ids = ($_POST['ids']); - $success = true; - $redirect = '?action=give&ids='.$ids; + case 'give': + $ids = $_POST['ids']; + $success = true; + $redirect = '?action=give&ids='.$ids; - break; + break; - case 'move': - $ids = json_decode($_POST['ids']); - // list($success, $message, $redirect, $aftermove) = listMove($table, $ids, true, 'correctdrops'); - // Refactored list move method to use a transaction block and bulk insert for the correctdrops method - list($success, $message, $redirect, $aftermove) = listBulkMove($table, $ids, true, 'bulkcorrectdrops'); + case 'move': + $ids = json_decode($_POST['ids']); + // list($success, $message, $redirect, $aftermove) = listMove($table, $ids, true, 'correctdrops'); + // Refactored list move method to use a transaction block and bulk insert for the correctdrops method + list($success, $message, $redirect, $aftermove) = listBulkMove($table, $ids, true, 'bulkcorrectdrops'); - break; + break; - case 'delete': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listDelete($table, $ids); + case 'delete': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listDelete($table, $ids); - break; + break; - case 'copy': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listCopy($table, $ids, 'name'); + case 'copy': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listCopy($table, $ids, 'name'); - break; + break; - case 'hide': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listShowHide($table, $ids, 0); + case 'hide': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listShowHide($table, $ids, 0); - break; + break; - case 'show': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listShowHide($table, $ids, 1); + case 'show': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listShowHide($table, $ids, 1); - break; + break; - case 'touch': - $ids = explode(',', $_POST['ids']); - $userId = $_SESSION['user']['id']; - // Query speed optimised for 500 records from 6.2 seconds to 0.54 seconds using transaction blocks over UPDATE and bulk inserts - db_transaction(function () use ($ids, $userId) { - foreach ($ids as $id) { - db_query('UPDATE people SET modified = NOW(), modified_by = :user WHERE id = :id', ['id' => $id, 'user' => $userId]); - } - }); - // Bulk insert used to insert into history table - simpleBulkSaveChangeHistory('people', $ids, 'Touched'); - - $success = true; - $message = 'Selected people have been touched'; - $redirect = false; - - break; - - case 'print': - $success = true; - $redirect = '/pdf/'.$_POST['option'].'card.php?id='.$_POST['ids']; - - break; - - case 'export': - $success = true; - $_SESSION['export_ids_people'] = $_POST['ids']; - $redirect = '?action=people_export'; - - break; - - case 'tag': - if ('undefined' == $_POST['option']) { - $success = false; - $message = 'No tags exist. Please go to "Manage tags" to create tags.'; - $redirect = false; - } else { - // set tag id - $tag_id = $_POST['option']; - $people_ids = $ids; - if (sizeof($people_ids) > 0) { - // Query speed optimised for 500 records from 3.2 seconds to 0.039 seconds using bulk inserts - $query = 'INSERT IGNORE INTO tags_relations (tag_id, object_type, `object_id`) VALUES '; - - $params = []; - - for ($i = 0; $i < sizeof($people_ids); ++$i) { - $query .= "(:tag_id, 'People', :people_id{$i})"; - $params = array_merge($params, ['people_id'.$i => $people_ids[$i]]); - if ($i !== sizeof($people_ids) - 1) { - $query .= ','; + case 'touch': + $ids = explode(',', $_POST['ids']); + $userId = $_SESSION['user']['id']; + // Query speed optimised for 500 records from 6.2 seconds to 0.54 seconds using transaction blocks over UPDATE and bulk inserts + db_transaction(function () use ($ids, $userId) { + foreach ($ids as $id) { + db_query('UPDATE people SET modified = NOW(), modified_by = :user WHERE id = :id', ['id' => $id, 'user' => $userId]); } - } - - $params = array_merge($params, ['tag_id' => $tag_id]); - db_query($query, $params); + }); + // Bulk insert used to insert into history table + simpleBulkSaveChangeHistory('people', $ids, 'Touched'); $success = true; - $message = 'Tags added'; - $redirect = true; - } else { - $success = false; - $message = 'To apply the tag, the beneficiary must be checked'; + $message = 'Selected people have been touched'; $redirect = false; - } - } - break; - - case 'rtag': - if ('undefined' == $_POST['option']) { - $success = false; - $message = 'No tags exist. Please go to "Manage tags" to create tags.'; - $redirect = false; - } else { - // set tag id - $tag_id = $_POST['option']; - $people_ids = $ids; - if (sizeof($people_ids) > 0) { - // Query speed optimised using transaction block and bulk delete - // related to this trello card https://trello.com/c/g24mIVb8 - db_transaction(function () use ($tag_id, $people_ids) { - $deleteClause = []; - foreach ($people_ids as $people_id) { - $deleteClause[] = sprintf('(%d, "%s", %d)', $tag_id, 'People', $people_id); + break; + + case 'print': + $success = true; + $redirect = '/pdf/'.$_POST['option'].'card.php?id='.$_POST['ids']; + + break; + + case 'export': + $success = true; + $_SESSION['export_ids_people'] = $_POST['ids']; + $redirect = '?action=people_export'; + + break; + + case 'tag': + if ('undefined' == $_POST['option']) { + $success = false; + $message = 'No tags exist. Please go to "Manage tags" to create tags.'; + $redirect = false; + } else { + // set tag id + $tag_id = $_POST['option']; + $people_ids = $ids; + if (sizeof($people_ids) > 0) { + // Query speed optimised for 500 records from 3.2 seconds to 0.039 seconds using bulk inserts + $query = 'INSERT IGNORE INTO tags_relations (tag_id, object_type, `object_id`) VALUES '; + + $params = []; + + for ($i = 0; $i < sizeof($people_ids); ++$i) { + $query .= "(:tag_id, 'People', :people_id{$i})"; + $params = array_merge($params, ['people_id'.$i => $people_ids[$i]]); + if ($i !== sizeof($people_ids) - 1) { + $query .= ','; + } + } + + $params = array_merge($params, ['tag_id' => $tag_id]); + db_query($query, $params); + + $success = true; + $message = 'Tags added'; + $redirect = true; + } else { + $success = false; + $message = 'To apply the tag, the beneficiary must be checked'; + $redirect = false; } - if (sizeof($deleteClause) > 0) { - db_query('DELETE FROM tags_relations WHERE (tag_id, object_type, `object_id`) IN ('.join(',', $deleteClause).')'); + } + + break; + + case 'rtag': + if ('undefined' == $_POST['option']) { + $success = false; + $message = 'No tags exist. Please go to "Manage tags" to create tags.'; + $redirect = false; + } else { + // set tag id + $tag_id = $_POST['option']; + $people_ids = $ids; + if (sizeof($people_ids) > 0) { + // Query speed optimised using transaction block and bulk delete + // related to this trello card https://trello.com/c/g24mIVb8 + db_transaction(function () use ($tag_id, $people_ids) { + $deleteClause = []; + foreach ($people_ids as $people_id) { + $deleteClause[] = sprintf('(%d, "%s", %d)', $tag_id, 'People', $people_id); + } + if (sizeof($deleteClause) > 0) { + db_query('DELETE FROM tags_relations WHERE (tag_id, object_type, `object_id`) IN ('.join(',', $deleteClause).')'); + } + }); + $success = true; + $message = 'Tags removed'; + $redirect = true; + } else { + $success = false; + $message = 'To remove the tag, the beneficiary must be checked'; + $redirect = false; } - }); - $success = true; - $message = 'Tags removed'; - $redirect = true; - } else { - $success = false; - $message = 'To remove the tag, the beneficiary must be checked'; - $redirect = false; - } - } + } - break; - } + break; + } } $return = ['success' => $success, 'message' => $message, 'redirect' => $redirect, 'action' => $aftermove]; echo json_encode($return); - exit(); + exit; } } ); - function correctchildren() - { - $result = db_query('SELECT (SELECT p2.parent_id FROM people AS p2 WHERE p2.id = p1.parent_id) AS newparent, p1.id FROM people AS p1 WHERE p1.parent_id > 0 AND (SELECT p2.parent_id FROM people AS p2 WHERE p2.id = p1.parent_id) AND NOT deleted'); - // Optimized update queries by adding transaction blocks around update statements - db_transaction(function () use ($result) { - while ($row = db_fetch($result)) { - db_query('UPDATE people SET parent_id = :newparent WHERE id = :id', ['newparent' => $row['newparent'], 'id' => $row['id']]); - } - }); +function correctchildren() +{ + $result = db_query('SELECT (SELECT p2.parent_id FROM people AS p2 WHERE p2.id = p1.parent_id) AS newparent, p1.id FROM people AS p1 WHERE p1.parent_id > 0 AND (SELECT p2.parent_id FROM people AS p2 WHERE p2.id = p1.parent_id) AND NOT deleted'); + // Optimized update queries by adding transaction blocks around update statements + db_transaction(function () use ($result) { + while ($row = db_fetch($result)) { + db_query('UPDATE people SET parent_id = :newparent WHERE id = :id', ['newparent' => $row['newparent'], 'id' => $row['id']]); } + }); +} - function correctdrops($id) - { - $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); - $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); +function correctdrops($id) +{ + $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); + $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); - if ($drops && $person['parent_id']) { - // Combining insert values to create bulk inserts instead of two insert statements - db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES + if ($drops && $person['parent_id']) { + // Combining insert values to create bulk inserts instead of two insert statements + db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$person['parent_id'].', '.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].'), ('.$person['id'].', -'.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].')'); - $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); - $aftermove = 'correctDrops({id:'.$person['id'].', value: ""}, {id:'.$person['parent_id'].', value: '.$newamount.'})'; + $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); + $aftermove = 'correctDrops({id:'.$person['id'].', value: ""}, {id:'.$person['parent_id'].', value: '.$newamount.'})'; - return $aftermove; - } + return $aftermove; + } +} + +function bulkcorrectdrops($ids) +{ + $query = ''; + $aftermove = ''; + $finalIds = []; + for ($i = 0; $i < sizeof($ids); ++$i) { + $id = $ids[$i]; + $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); + $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); + + if ($drops && $person['parent_id']) { + $finalIds[] = $id; + $query .= '('.$person['parent_id'].', '.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].'), '; + $query .= '('.$person['id'].', -'.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].'), '; } + } + if ('' !== $query) { + // Removing an extra comma from the end of query + $query = substr($query, 0, strlen($query) - 2); + db_query("INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES {$query}"); + } - function bulkcorrectdrops($ids) - { - $query = ''; - $aftermove = ''; - $finalIds = []; - for ($i = 0; $i < sizeof($ids); ++$i) { - $id = $ids[$i]; - $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); - $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); - - if ($drops && $person['parent_id']) { - $finalIds[] = $id; - $query .= '('.$person['parent_id'].', '.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].'), '; - $query .= '('.$person['id'].', -'.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].'), '; - } - } - if ('' !== $query) { - // Removing an extra comma from the end of query - $query = substr($query, 0, strlen($query) - 2); - db_query("INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES {$query}"); - } - - // Correction of the dropped values - new values must be retrieved through a query - for ($i = 0; $i < sizeof($finalIds); ++$i) { - $id = $finalIds[$i]; - $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); - $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); + // Correction of the dropped values - new values must be retrieved through a query + for ($i = 0; $i < sizeof($finalIds); ++$i) { + $id = $finalIds[$i]; + $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); + $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); - $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); - $aftermove .= 'correctDrops({"id":'.$person['id'].', "value": ""}, {"id":'.$person['parent_id'].', "value": '.$newamount.'}); '; - } + $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); + $aftermove .= 'correctDrops({"id":'.$person['id'].', "value": ""}, {"id":'.$person['parent_id'].', "value": '.$newamount.'}); '; + } - return $aftermove; - } + return $aftermove; +} diff --git a/include/people_deactivated.php b/include/people_deactivated.php index 31468b76..f9983f7b 100644 --- a/include/people_deactivated.php +++ b/include/people_deactivated.php @@ -2,34 +2,34 @@ use OpenCensus\Trace\Tracer; - $table = 'people'; - $action = 'people'; - $ajax = checkajax(); - - if (!$ajax) { - $translate['cms_list_confirm_title'] = 'Are you sure? You can not undo this anymore'; - - initlist(); - - $cmsmain->assign('title', 'Beneficiaries'); - - listsetting('allowcopy', false); - listsetting('allowmove', false); - listsetting('allowmoveto', 1); - listsetting('allowsort', true); - listsetting('allowshowhide', false); - listsetting('allowdelete', false); - listsetting('allowedit', false); - //listsetting('allowselect',array(1)); - listsetting('search', ['firstname', 'lastname', 'container']); - listsetting('allowadd', false); - listsetting('haspagemenu', true); - - addpagemenu('all', 'All', ['link' => '?action=people']); - addpagemenu('deactivated', 'Deactivated', ['link' => '?action=people_deactivated', 'active' => true]); - - //listfilter(array('label'=>'Filter op afdeling','query'=>'SELECT id AS value, title AS label FROM people_cats WHERE visible AND NOT deleted ORDER BY seq','filter'=>'c.id')); - $data = getlistdata('SELECT IF(people.parent_id,NULL,GREATEST(COALESCE((SELECT transaction_date +$table = 'people'; +$action = 'people'; +$ajax = checkajax(); + +if (!$ajax) { + $translate['cms_list_confirm_title'] = 'Are you sure? You can not undo this anymore'; + + initlist(); + + $cmsmain->assign('title', 'Beneficiaries'); + + listsetting('allowcopy', false); + listsetting('allowmove', false); + listsetting('allowmoveto', 1); + listsetting('allowsort', true); + listsetting('allowshowhide', false); + listsetting('allowdelete', false); + listsetting('allowedit', false); + // listsetting('allowselect',array(1)); + listsetting('search', ['firstname', 'lastname', 'container']); + listsetting('allowadd', false); + listsetting('haspagemenu', true); + + addpagemenu('all', 'All', ['link' => '?action=people']); + addpagemenu('deactivated', 'Deactivated', ['link' => '?action=people_deactivated', 'active' => true]); + + // listfilter(array('label'=>'Filter op afdeling','query'=>'SELECT id AS value, title AS label FROM people_cats WHERE visible AND NOT deleted ORDER BY seq','filter'=>'c.id')); + $data = getlistdata('SELECT IF(people.parent_id,NULL,GREATEST(COALESCE((SELECT transaction_date FROM transactions AS t WHERE t.people_id = people.id AND people.parent_id IS NULL AND product_id IS NOT NULL ORDER BY transaction_date DESC LIMIT 1),0), COALESCE(people.created,0))) AS lastactive, @@ -53,108 +53,108 @@ GROUP BY people.id ORDER BY deleted DESC'); - addcolumn('text', 'Surname', 'lastname'); - addcolumn('text', 'Firstname', 'firstname'); - addcolumn('text', 'Head of Family', 'family_head'); - addcolumn('text', 'Gender', 'gender2'); - addcolumn('text', 'Age', 'age'); - addcolumn('text', $_SESSION['camp']['familyidentifier'], 'container'); - addcolumn('text', ucwords($_SESSION['camp']['currencyname']), 'drops'); - addcolumn('datetime', 'Last active', 'lastactive'); - - addbutton('undelete', 'Activate', ['icon' => 'fa-history', 'oneitemonly' => false, 'testId' => 'recoverDeactivatedUser']); - addbutton('realdelete', 'Full delete', ['icon' => 'fa-trash', 'oneitemonly' => false, 'confirm' => true, 'testId' => 'fullDeleteUser']); - addcolumn('html', ' ', 'icons'); - - Tracer::inSpan( - ['name' => ('include/people_deactivated.php:hasActiveParent')], - function () use (&$data) { - global $settings; - - foreach ($data as $key => $value) { - if ('1' == $data[$key]['has_not_active_parent']) { - $data[$key]['icons'] .= sprintf('', $data[$key]['firstname'].' '.$data[$key]['lastname'], $data[$key]['family_head']); - } + addcolumn('text', 'Surname', 'lastname'); + addcolumn('text', 'Firstname', 'firstname'); + addcolumn('text', 'Head of Family', 'family_head'); + addcolumn('text', 'Gender', 'gender2'); + addcolumn('text', 'Age', 'age'); + addcolumn('text', $_SESSION['camp']['familyidentifier'], 'container'); + addcolumn('text', ucwords($_SESSION['camp']['currencyname']), 'drops'); + addcolumn('datetime', 'Last active', 'lastactive'); + + addbutton('undelete', 'Activate', ['icon' => 'fa-history', 'oneitemonly' => false, 'testId' => 'recoverDeactivatedUser']); + addbutton('realdelete', 'Full delete', ['icon' => 'fa-trash', 'oneitemonly' => false, 'confirm' => true, 'testId' => 'fullDeleteUser']); + addcolumn('html', ' ', 'icons'); + + Tracer::inSpan( + ['name' => 'include/people_deactivated.php:hasActiveParent'], + function () use (&$data) { + global $settings; + + foreach ($data as $key => $value) { + if ('1' == $data[$key]['has_not_active_parent']) { + $data[$key]['icons'] .= sprintf('', $data[$key]['firstname'].' '.$data[$key]['lastname'], $data[$key]['family_head']); } } - ); - $cmsmain->assign('data', $data); - $cmsmain->assign('listconfig', $listconfig); - $cmsmain->assign('listdata', $listdata); - $cmsmain->assign('include', 'cms_list.tpl'); - } else { - switch ($_POST['do']) { - case 'undelete': - $ids = explode(',', $_POST['ids']); - $finalIds = []; - $errorMessage = ''; - foreach ($ids as $id) { - $person = db_row('SELECT concat(firstname," ",lastname) as fullname, parent_id FROM people WHERE id = :id', ['id' => $id]); - $parentId = $person['parent_id']; - $parent = ($parentId) ? db_row('SELECT (NOT deleted OR deleted IS NULL) as has_active_parent, concat(firstname," ",lastname) as family_head FROM people WHERE id = :id', ['id' => $parentId]) : null; - $hasActiveParent = ($parent['has_active_parent']) ?? false; - if ($parentId && !in_array($parentId, $ids) && !boolval($hasActiveParent)) { - $errorMessage .= sprintf('Family head %s must be active before %s can be reactivated.
', $parent['family_head'], $person['fullname']); - - continue; - } - $finalIds[] = $id; - } - if (empty($errorMessage)) { - // Optimised by using bulk inserts and transactions over update queries - list($success, $message, $redirect) = listBulkUndelete($table, $finalIds, false, false); - $redirect = true; - } else { - $success = false; - $redirect = false; - $message = (!empty($errorMessage)) ? $errorMessage : ''; + } + ); + $cmsmain->assign('data', $data); + $cmsmain->assign('listconfig', $listconfig); + $cmsmain->assign('listdata', $listdata); + $cmsmain->assign('include', 'cms_list.tpl'); +} else { + switch ($_POST['do']) { + case 'undelete': + $ids = explode(',', $_POST['ids']); + $finalIds = []; + $errorMessage = ''; + foreach ($ids as $id) { + $person = db_row('SELECT concat(firstname," ",lastname) as fullname, parent_id FROM people WHERE id = :id', ['id' => $id]); + $parentId = $person['parent_id']; + $parent = ($parentId) ? db_row('SELECT (NOT deleted OR deleted IS NULL) as has_active_parent, concat(firstname," ",lastname) as family_head FROM people WHERE id = :id', ['id' => $parentId]) : null; + $hasActiveParent = $parent['has_active_parent'] ?? false; + if ($parentId && !in_array($parentId, $ids) && !boolval($hasActiveParent)) { + $errorMessage .= sprintf('Family head %s must be active before %s can be reactivated.
', $parent['family_head'], $person['fullname']); + + continue; } - - break; - - case 'realdelete': - $ids = explode(',', $_POST['ids']); - // Transaction block added over update queries - [$success, $message, $redirect] = db_transaction(function () use ($ids, $table) { - foreach ($ids as $id) { - // unlink transactions - db_query('UPDATE transactions SET people_id = NULL WHERE people_id = :id', ['id' => $id]); - // unlink parent from children - db_query('UPDATE people SET parent_id = NULL WHERE parent_id = :id AND deleted', ['id' => $id]); - // remove tags already assigned to the beneficiary - db_query('DELETE FROM tags_relations WHERE `object_id` = :id AND object_type = "People"', ['id' => $id]); - } - - // Optimized by using bulk inserts and transactions over delete queries - list($success, $message, $redirect) = listBulkRealDelete($table, $ids); - - return [$success, $message, $redirect]; - }); + $finalIds[] = $id; + } + if (empty($errorMessage)) { + // Optimised by using bulk inserts and transactions over update queries + list($success, $message, $redirect) = listBulkUndelete($table, $finalIds, false, false); $redirect = true; + } else { + $success = false; + $redirect = false; + $message = (!empty($errorMessage)) ? $errorMessage : ''; + } - break; - } + break; - $return = ['success' => $success, 'message' => $message, 'redirect' => $redirect, 'action' => $aftermove]; + case 'realdelete': + $ids = explode(',', $_POST['ids']); + // Transaction block added over update queries + [$success, $message, $redirect] = db_transaction(function () use ($ids, $table) { + foreach ($ids as $id) { + // unlink transactions + db_query('UPDATE transactions SET people_id = NULL WHERE people_id = :id', ['id' => $id]); + // unlink parent from children + db_query('UPDATE people SET parent_id = NULL WHERE parent_id = :id AND deleted', ['id' => $id]); + // remove tags already assigned to the beneficiary + db_query('DELETE FROM tags_relations WHERE `object_id` = :id AND object_type = "People"', ['id' => $id]); + } - echo json_encode($return); + // Optimized by using bulk inserts and transactions over delete queries + list($success, $message, $redirect) = listBulkRealDelete($table, $ids); - exit(); + return [$success, $message, $redirect]; + }); + $redirect = true; + + break; } - function correctdrops($id) - { - //$action = 'correctDrops({id:847, value: 1400}, {id:14, value: 1900})'; + $return = ['success' => $success, 'message' => $message, 'redirect' => $redirect, 'action' => $aftermove]; - $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); - $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); + echo json_encode($return); - if ($drops && $person['parent_id']) { - db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$person['parent_id'].', '.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].')'); - db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$person['id'].', -'.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].')'); - $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); - $aftermove = 'correctDrops({id:'.$person['id'].', value: ""}, {id:'.$person['parent_id'].', value: '.$newamount.'})'; + exit; +} - return $aftermove; - } +function correctdrops($id) +{ + // $action = 'correctDrops({id:847, value: 1400}, {id:14, value: 1900})'; + + $drops = db_value('SELECT SUM(drops) FROM transactions AS t WHERE people_id = :id', ['id' => intval($id)]); + $person = db_row('SELECT * FROM people AS p WHERE id = :id', ['id' => $id]); + + if ($drops && $person['parent_id']) { + db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$person['parent_id'].', '.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved from family member to family head", NOW(), '.$_SESSION['user']['id'].')'); + db_query('INSERT INTO transactions (people_id, drops, description, transaction_date, user_id) VALUES ('.$person['id'].', -'.$drops.', "'.ucwords($_SESSION['camp']['currencyname']).' moved to new family head", NOW(), '.$_SESSION['user']['id'].')'); + $newamount = db_value('SELECT SUM(drops) FROM transactions WHERE people_id = :id', ['id' => $person['parent_id']]); + $aftermove = 'correctDrops({id:'.$person['id'].', value: ""}, {id:'.$person['parent_id'].', value: '.$newamount.'})'; + + return $aftermove; } +} diff --git a/include/people_edit.php b/include/people_edit.php index 1129033b..9679242c 100644 --- a/include/people_edit.php +++ b/include/people_edit.php @@ -13,7 +13,7 @@ echo json_encode($return); - exit(); + exit; } // all other form submission @@ -302,7 +302,7 @@ 'columns' => ['drops2' => ucwords($_SESSION['camp']['currencyname']), 'description' => 'Note', 'user' => 'Transaction made by', 'tdate' => 'Date'], 'allowedit' => false, 'allowadd' => $data['allowdrops'], 'add' => 'Give '.ucwords($_SESSION['camp']['currencyname']), 'addaction' => 'give&ids='.intval($id), 'allowsort' => false, 'allowselect' => true, 'allowselectall' => false, 'action' => 'people_edit', 'redirect' => true, 'modal' => false, ]); - //show borrow history + // show borrow history addfield('line', '', '', ['tab' => 'bicycle']); if (db_value('SELECT id FROM borrow_transactions WHERE people_id ='.$id)) { addfield('list', 'Last 10 transactions', 'bicycles', ['tab' => 'bicycle', 'width' => 10, 'query' => ' diff --git a/include/people_export.php b/include/people_export.php index cd41249f..f2f07152 100644 --- a/include/people_export.php +++ b/include/people_export.php @@ -1,10 +1,10 @@ assign('include', 'printed_list_people.tpl'); - $cmsmain->assign('list', $list); + $cmsmain->assign('include', 'printed_list_people.tpl'); + $cmsmain->assign('list', $list); - // place the form elements and data in the template - $cmsmain->assign('data', $data); - $cmsmain->assign('formelements', $formdata); - $cmsmain->assign('formbuttons', $formbuttons); + // place the form elements and data in the template + $cmsmain->assign('data', $data); + $cmsmain->assign('formelements', $formdata); + $cmsmain->assign('formbuttons', $formbuttons); diff --git a/include/printed_list_people_oud.php b/include/printed_list_people_oud.php index 9c32499e..c031b15f 100644 --- a/include/printed_list_people_oud.php +++ b/include/printed_list_people_oud.php @@ -58,12 +58,12 @@ } } - exit(); + exit; } - $cmsmain->assign('include', 'printed_list_people.tpl'); - $cmsmain->assign('list', $list); + $cmsmain->assign('include', 'printed_list_people.tpl'); + $cmsmain->assign('list', $list); - // place the form elements and data in the template - $cmsmain->assign('data', $data); - $cmsmain->assign('formelements', $formdata); - $cmsmain->assign('formbuttons', $formbuttons); + // place the form elements and data in the template + $cmsmain->assign('data', $data); + $cmsmain->assign('formelements', $formdata); + $cmsmain->assign('formbuttons', $formbuttons); diff --git a/include/products.php b/include/products.php index bf9b0754..2e20616b 100644 --- a/include/products.php +++ b/include/products.php @@ -107,5 +107,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/products_edit.php b/include/products_edit.php index 6944bf1c..ae90364b 100644 --- a/include/products_edit.php +++ b/include/products_edit.php @@ -58,11 +58,11 @@ 'allowedit' => true, 'allowadd' => false, 'allowselect' => true, 'allowselectall' => false, 'allowshowhide' => false, 'action' => 'stock', 'redirect' => true, 'allowsort' => true, ]); } -/* - addfield('line','',''); - addfield('number','Maximum per adult per two weeks','maxperadult',array('width'=>3)); - addfield('number','Maximum per child per two weeks','maxperchild',array('width'=>3)); -*/ + /* + addfield('line','',''); + addfield('number','Maximum per adult per two weeks','maxperadult',array('width'=>3)); + addfield('number','Maximum per child per two weeks','maxperchild',array('width'=>3)); + */ addfield('line', '', '', ['aside' => true]); addfield('created', 'Created', 'created', ['aside' => true]); diff --git a/include/products_export.php b/include/products_export.php index e9b15096..64ad6e59 100644 --- a/include/products_export.php +++ b/include/products_export.php @@ -2,11 +2,11 @@ $locations = join(',', db_simplearray('SELECT id, id FROM locations WHERE visible AND deleted IS NULL AND camp_id = :camp_id AND type = "Warehouse"', ['camp_id' => $_SESSION['camp']['id']])); -//Create array with the export_ids_people in it +// Create array with the export_ids_people in it $export_ids_array = explode(',', $_SESSION['export_ids_products']); -//Create a list of placeholders ? the same length as export ids given +// Create a list of placeholders ? the same length as export ids given $id_pars = str_repeat('?,', count($export_ids_array) - 1).'?'; -//Put camp id as first element in the list +// Put camp id as first element in the list if ('' != $export_ids_array[0]) { array_unshift($export_ids_array, $_SESSION['camp']['id']); diff --git a/include/sales_list.php b/include/sales_list.php index 51513163..75a7f17a 100644 --- a/include/sales_list.php +++ b/include/sales_list.php @@ -90,7 +90,7 @@ $data[$key]['people'] = db_value('SELECT COUNT(DISTINCT(p.id)) FROM people AS p, transactions AS t WHERE (p.id = t.people_id OR p.parent_id = t.people_id) AND t.transaction_date >= "'.$date.' 00:00" AND t.transaction_date <= "'.$date.' 23:59" AND t.product_id > 0 AND t.people_id > 0 AND camp_id = :campid', ['campid' => $_SESSION['camp']['id']]); $totalvisitors += $data[$key]['people']; } - addcolumn('text', 'Sales', 'salesdate', ['headerClass' => 'sorter-shortDate dateFormat-ddmmyyyy']); //tablesorter works with dates only if header has a proper class assigned - https://mottie.github.io/tablesorter/docs/example-option-date-format.html + addcolumn('text', 'Sales', 'salesdate', ['headerClass' => 'sorter-shortDate dateFormat-ddmmyyyy']); // tablesorter works with dates only if header has a proper class assigned - https://mottie.github.io/tablesorter/docs/example-option-date-format.html addcolumn('text', 'Amount', 'aantal'); addcolumn('text', 'Beneficiaries', 'people'); $cmsmain->assign('listfooter', ['Total sales', $totalsales.' items ('.$totaldrops.' '.$_SESSION['camp']['currencyname'].')', $totalvisitors]); diff --git a/include/sizes.php b/include/sizes.php index 32888a56..8023bdfc 100644 --- a/include/sizes.php +++ b/include/sizes.php @@ -73,5 +73,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/stock.php b/include/stock.php index 3493a98f..3021a2d4 100644 --- a/include/stock.php +++ b/include/stock.php @@ -3,7 +3,7 @@ use OpenCensus\Trace\Tracer; Tracer::inSpan( - ['name' => ('stock.php')], + ['name' => 'stock.php'], function () use ($action, &$cmsmain) { global $table, $listconfig, $listdata; @@ -14,13 +14,13 @@ function () use ($action, &$cmsmain) { initlist(); listsetting('manualquery', true); - //title + // title $cmsmain->assign('title', 'Manage Boxes'); - //search box + // search box listsetting('search', ['box_id', 'l.label', 's.label', 'g.label', 'p.name', 'stock.comments']); - //Location filter + // Location filter listfilter(['label' => 'By Location', 'query' => 'SELECT id, label FROM locations WHERE deleted IS NULL AND visible = 1 AND camp_id = '.$_SESSION['camp']['id'].' AND type = "Warehouse" ORDER BY seq', 'filter' => 'l.id']); // Status Filter @@ -44,30 +44,30 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) } switch ($applied_filter) { - case 'boxes_in_stock': - return ' AND l.visible'; + case 'boxes_in_stock': + return ' AND l.visible'; - case 'ordered': - return ' AND (stock.ordered OR stock.picked) AND l.visible'; + case 'ordered': + return ' AND (stock.ordered OR stock.picked) AND l.visible'; - case 'dispose': - return ' AND DATEDIFF(now(),stock.modified) > 90 AND l.visible'; + case 'dispose': + return ' AND DATEDIFF(now(),stock.modified) > 90 AND l.visible'; - case 'lost_boxes': - return ' AND l.is_lost'; + case 'lost_boxes': + return ' AND l.is_lost'; - case 'shop': - return ' AND l.is_market'; + case 'shop': + return ' AND l.is_market'; - case 'scrap': - return ' AND l.is_scrap'; + case 'scrap': + return ' AND l.is_scrap'; - case 'showall': - return ' '; + case 'showall': + return ' '; - default: - return ' AND l.visible'; - } + default: + return ' AND l.visible'; + } } $applied_filter2_query = get_filter2_query($_SESSION['filter2']['stock'], $outgoinglocations); @@ -75,7 +75,7 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) $genders = db_simplearray('SELECT id AS value, label FROM genders ORDER BY seq'); listfilter3(['label' => 'Gender', 'options' => $genders, 'filter' => '"s.gender_id"']); - //Category Filter + // Category Filter $itemlist = db_simplearray('SELECT pc.id, pc.label from products AS p INNER JOIN product_categories AS pc ON pc.id = p.category_id WHERE (camp_id = '.$_SESSION['camp']['id'].')'); listfilter4(['label' => 'Category', 'options' => $itemlist, 'filter' => 'p.category_id']); @@ -208,202 +208,202 @@ function get_filter2_query($applied_filter, $custom_outgoing_locations) $cmsmain->assign('include', 'cms_list.tpl'); } else { switch ($_POST['do']) { - case 'movebox': - $ids = explode(',', $_POST['ids']); - $count = 0; - foreach ($ids as $id) { - $box = db_row('SELECT * FROM stock WHERE id = :id', ['id' => $id]); - - db_query('UPDATE stock SET modified = NOW(), modified_by = '.$_SESSION['user']['id'].', ordered = NULL, ordered_by = NULL, picked = NULL, picked_by = NULL, location_id = :location WHERE id = :id', ['location' => $_POST['option'], 'id' => $id]); - $from['int'] = $box['location_id']; - $to['int'] = $_POST['option']; - simpleSaveChangeHistory('stock', $id, 'location_id', $from, $to); - - if ($box['location_id'] != $_POST['option']) { - db_query('INSERT INTO itemsout (product_id, size_id, count, movedate, from_location, to_location) VALUES ('.$box['product_id'].','.$box['size_id'].','.$box['items'].',NOW(),'.$box['location_id'].','.$_POST['option'].')'); - } + case 'movebox': + $ids = explode(',', $_POST['ids']); + $count = 0; + foreach ($ids as $id) { + $box = db_row('SELECT * FROM stock WHERE id = :id', ['id' => $id]); + + db_query('UPDATE stock SET modified = NOW(), modified_by = '.$_SESSION['user']['id'].', ordered = NULL, ordered_by = NULL, picked = NULL, picked_by = NULL, location_id = :location WHERE id = :id', ['location' => $_POST['option'], 'id' => $id]); + $from['int'] = $box['location_id']; + $to['int'] = $_POST['option']; + simpleSaveChangeHistory('stock', $id, 'location_id', $from, $to); + + if ($box['location_id'] != $_POST['option']) { + db_query('INSERT INTO itemsout (product_id, size_id, count, movedate, from_location, to_location) VALUES ('.$box['product_id'].','.$box['size_id'].','.$box['items'].',NOW(),'.$box['location_id'].','.$_POST['option'].')'); + } - ++$count; - } - $success = $count; - $message = (1 == $count ? '1 box is' : $count.' boxes are').' moved'; - $redirect = '?action='.$_GET['action']; - - break; - - case 'order': - $ids = explode(',', $_POST['ids']); - foreach ($ids as $id) { - db_query('UPDATE stock SET ordered = NOW(), ordered_by = :user, picked = NULL, picked_by = NULL WHERE id = '.intval($id), ['user' => $_SESSION['user']['id']]); - simpleSaveChangeHistory('stock', intval($id), 'Box ordered to shop '); - $message = 'Boxes are marked as ordered for you!'; - $success = true; - $redirect = true; - } + ++$count; + } + $success = $count; + $message = (1 == $count ? '1 box is' : $count.' boxes are').' moved'; + $redirect = '?action='.$_GET['action']; + + break; + + case 'order': + $ids = explode(',', $_POST['ids']); + foreach ($ids as $id) { + db_query('UPDATE stock SET ordered = NOW(), ordered_by = :user, picked = NULL, picked_by = NULL WHERE id = '.intval($id), ['user' => $_SESSION['user']['id']]); + simpleSaveChangeHistory('stock', intval($id), 'Box ordered to shop '); + $message = 'Boxes are marked as ordered for you!'; + $success = true; + $redirect = true; + } - break; + break; - case 'undo-order': - $ids = explode(',', $_POST['ids']); - foreach ($ids as $id) { - db_query('UPDATE stock SET ordered = NULL, ordered_by = NULL, picked = NULL, picked_by = NULL WHERE id = '.$id); - simpleSaveChangeHistory('stock', $id, 'Box order made undone '); - $message = 'Boxes are unmarked as ordered'; - $success = true; - $redirect = true; - } + case 'undo-order': + $ids = explode(',', $_POST['ids']); + foreach ($ids as $id) { + db_query('UPDATE stock SET ordered = NULL, ordered_by = NULL, picked = NULL, picked_by = NULL WHERE id = '.$id); + simpleSaveChangeHistory('stock', $id, 'Box order made undone '); + $message = 'Boxes are unmarked as ordered'; + $success = true; + $redirect = true; + } - break; + break; - case 'qr': - $id = $_POST['ids']; - $redirect = '/pdf/qr.php?label='.$id; + case 'qr': + $id = $_POST['ids']; + $redirect = '/pdf/qr.php?label='.$id; - break; + break; - case 'move': - $ids = json_decode($_POST['ids']); - list($success, $message, $redirect) = listMove($table, $ids); + case 'move': + $ids = json_decode($_POST['ids']); + list($success, $message, $redirect) = listMove($table, $ids); - break; + break; - case 'delete': - $stock_ids = explode(',', $_POST['ids']); - [$success, $message, $redirect] = db_transaction(function () use ($table, $stock_ids) { - list($success, $message, $redirect) = listDelete($table, $stock_ids); + case 'delete': + $stock_ids = explode(',', $_POST['ids']); + [$success, $message, $redirect] = db_transaction(function () use ($table, $stock_ids) { + list($success, $message, $redirect) = listDelete($table, $stock_ids); - $params = []; - $query = 'DELETE FROM tags_relations WHERE object_type = "Stock" AND (`object_id`) IN ('; - foreach ($stock_ids as $index => $stock_id) { - $query .= sprintf(' (:stock_id_%s) ', $index); + $params = []; + $query = 'DELETE FROM tags_relations WHERE object_type = "Stock" AND (`object_id`) IN ('; + foreach ($stock_ids as $index => $stock_id) { + $query .= sprintf(' (:stock_id_%s) ', $index); + + if (sizeof($stock_ids) - 1 !== $index) { + $query .= ', '; + } else { + $query .= ') '; + } - if (sizeof($stock_ids) - 1 !== $index) { - $query .= ', '; - } else { - $query .= ') '; + $params = array_merge($params, ['stock_id_'.$index => $stock_id]); + } + if (sizeof($params) > 0) { + db_query($query, $params); } - $params = array_merge($params, ['stock_id_'.$index => $stock_id]); - } - if (sizeof($params) > 0) { - db_query($query, $params); - } - - return [$success, $message, $redirect]; - }); - - break; - - case 'copy': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listCopy($table, $ids, 'menutitle'); - - break; - - case 'hide': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listShowHide($table, $ids, 0); + return [$success, $message, $redirect]; + }); - break; + break; - case 'show': - $ids = explode(',', $_POST['ids']); - list($success, $message, $redirect) = listShowHide($table, $ids, 1); + case 'copy': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listCopy($table, $ids, 'menutitle'); - break; + break; - case 'export': - $_SESSION['export_ids_stock'] = $_POST['ids']; - list($success, $message, $redirect) = [true, '', '?action=stock_export']; + case 'hide': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listShowHide($table, $ids, 0); - break; + break; - case 'tag': - $ids = explode(',', $_POST['ids']); - if ('undefined' == $_POST['option']) { - $success = false; - $message = 'No tags exist. Please go to "Manage tags" to create tags.'; - $redirect = false; - } else { - // set tag id - $tag_id = $_POST['option']; - $stock_ids = $ids; - if (sizeof($stock_ids) > 0) { - // Query speed optimised for 500 records from 3.2 seconds to 0.039 seconds using bulk inserts - $query = 'INSERT IGNORE INTO tags_relations (tag_id, object_type, `object_id`) VALUES '; + case 'show': + $ids = explode(',', $_POST['ids']); + list($success, $message, $redirect) = listShowHide($table, $ids, 1); - $params = []; + break; - for ($i = 0; $i < sizeof($stock_ids); ++$i) { - $query .= "(:tag_id, 'Stock', :stock_id{$i})"; - $params = array_merge($params, ['stock_id'.$i => $stock_ids[$i]]); - if ($i !== sizeof($stock_ids) - 1) { - $query .= ','; - } - } + case 'export': + $_SESSION['export_ids_stock'] = $_POST['ids']; + list($success, $message, $redirect) = [true, '', '?action=stock_export']; - $params = array_merge($params, ['tag_id' => $tag_id]); - db_query($query, $params); + break; - $success = true; - $message = 'Tags added'; - $redirect = true; - } else { + case 'tag': + $ids = explode(',', $_POST['ids']); + if ('undefined' == $_POST['option']) { $success = false; - $message = 'To apply the tag, the beneficiary must be checked'; + $message = 'No tags exist. Please go to "Manage tags" to create tags.'; $redirect = false; - } - } - - break; - - case 'rtag': - $ids = explode(',', $_POST['ids']); - if ('undefined' == $_POST['option']) { - $success = false; - $message = 'No tags exist. Please go to "Manage tags" to create tags.'; - $redirect = false; - } else { - // set tag id - $tag_id = $_POST['option']; - $stock_ids = $ids; - if (sizeof($stock_ids) > 0) { - db_transaction(function () use ($tag_id, $stock_ids) { - $query = 'DELETE FROM tags_relations WHERE object_type = "Stock" AND (tag_id, `object_id`) IN ('; + } else { + // set tag id + $tag_id = $_POST['option']; + $stock_ids = $ids; + if (sizeof($stock_ids) > 0) { + // Query speed optimised for 500 records from 3.2 seconds to 0.039 seconds using bulk inserts + $query = 'INSERT IGNORE INTO tags_relations (tag_id, object_type, `object_id`) VALUES '; $params = []; for ($i = 0; $i < sizeof($stock_ids); ++$i) { - $query .= "(:tag_id, :stock_id{$i})"; + $query .= "(:tag_id, 'Stock', :stock_id{$i})"; $params = array_merge($params, ['stock_id'.$i => $stock_ids[$i]]); if ($i !== sizeof($stock_ids) - 1) { $query .= ','; - } else { - $query .= ')'; } } $params = array_merge($params, ['tag_id' => $tag_id]); db_query($query, $params); - }); - $success = true; - $message = 'Tags removed'; - $redirect = true; - } else { + + $success = true; + $message = 'Tags added'; + $redirect = true; + } else { + $success = false; + $message = 'To apply the tag, the beneficiary must be checked'; + $redirect = false; + } + } + + break; + + case 'rtag': + $ids = explode(',', $_POST['ids']); + if ('undefined' == $_POST['option']) { $success = false; - $message = 'To remove the tag, the boxes must be checked'; + $message = 'No tags exist. Please go to "Manage tags" to create tags.'; $redirect = false; + } else { + // set tag id + $tag_id = $_POST['option']; + $stock_ids = $ids; + if (sizeof($stock_ids) > 0) { + db_transaction(function () use ($tag_id, $stock_ids) { + $query = 'DELETE FROM tags_relations WHERE object_type = "Stock" AND (tag_id, `object_id`) IN ('; + + $params = []; + + for ($i = 0; $i < sizeof($stock_ids); ++$i) { + $query .= "(:tag_id, :stock_id{$i})"; + $params = array_merge($params, ['stock_id'.$i => $stock_ids[$i]]); + if ($i !== sizeof($stock_ids) - 1) { + $query .= ','; + } else { + $query .= ')'; + } + } + + $params = array_merge($params, ['tag_id' => $tag_id]); + db_query($query, $params); + }); + $success = true; + $message = 'Tags removed'; + $redirect = true; + } else { + $success = false; + $message = 'To remove the tag, the boxes must be checked'; + $redirect = false; + } } - } - break; - } + break; + } $return = ['success' => $success, 'message' => $message, 'redirect' => $redirect]; echo json_encode($return); - exit(); + exit; } } ); diff --git a/include/stock_export.php b/include/stock_export.php index 71e32ab4..c1817279 100644 --- a/include/stock_export.php +++ b/include/stock_export.php @@ -1,10 +1,10 @@ 'Box number', 'product' => 'Product', 'gender' => 'Gender', 'size' => 'Size', 'location' => 'Location', 'boxage' => 'Age', 'items' => 'Items', 'comments' => 'Comments']; +$keys = ['box_id' => 'Box number', 'product' => 'Product', 'gender' => 'Gender', 'size' => 'Size', 'location' => 'Location', 'boxage' => 'Age', 'items' => 'Items', 'comments' => 'Comments']; csvexport($data, 'Stock', $keys); diff --git a/include/stock_overview.php b/include/stock_overview.php index d120d8e1..35a0815b 100644 --- a/include/stock_overview.php +++ b/include/stock_overview.php @@ -200,5 +200,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/stock_overview_edit.php b/include/stock_overview_edit.php index 3dc11065..667f9a0a 100644 --- a/include/stock_overview_edit.php +++ b/include/stock_overview_edit.php @@ -141,5 +141,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/tags.php b/include/tags.php index fea7b5e5..88171794 100644 --- a/include/tags.php +++ b/include/tags.php @@ -71,5 +71,5 @@ echo json_encode($return); - exit(); + exit; } diff --git a/include/tags_edit.php b/include/tags_edit.php index c0c3dd82..5706af4b 100644 --- a/include/tags_edit.php +++ b/include/tags_edit.php @@ -40,7 +40,7 @@ tags.deleted IS NULL AND tags.id = :id GROUP BY tags.id ', ['id' => $id]); - $onchange = sprintf('checkTags(%d);', $id); + $onchange = sprintf('checkTags(%d);', $id); addfield('text', 'Name', 'label', ['required' => true]); addfield('color', 'Color', 'color', ['required' => true]); diff --git a/include/vegetables.php b/include/vegetables.php index 577c8b55..7f32777f 100644 --- a/include/vegetables.php +++ b/include/vegetables.php @@ -18,7 +18,7 @@ $data[0]['containers'] = db_value('SELECT COUNT(DISTINCT(container)) FROM people WHERE visible AND camp_id = '.$_SESSION['camp']['id'].' AND NOT deleted'); $data[0]['extraportion'] = db_value('SELECT SUM(extraportion) FROM people WHERE visible AND camp_id = '.$_SESSION['camp']['id'].' AND NOT deleted'); - //DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), t.date_of_birth)), "%Y")+0 AS age + // DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), t.date_of_birth)), "%Y")+0 AS age listsetting('allowcopy', false); listsetting('allowedit', false); listsetting('allowadd', false); diff --git a/index.php b/index.php index 4fdb265a..e3bf076c 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ use OpenCensus\Trace\Tracer; Tracer::inSpan( - ['name' => ('index.php')], + ['name' => 'index.php'], function () { global $settings,$translate,$action,$lan,$pdf,$_txt,$formbuttons, $rolesToActions, $menusToActions; global $error,$listdata,$data,$table,$listconfig,$thisfile,$formdata; diff --git a/library/ajax/laundry.php b/library/ajax/laundry.php index 85125e55..bf7715cb 100644 --- a/library/ajax/laundry.php +++ b/library/ajax/laundry.php @@ -21,7 +21,7 @@ } $result = db_query('SELECT ls.*, lt.label, lm.label AS machine, la.noshow FROM laundry_appointments AS la, laundry_slots AS ls, laundry_times AS lt, laundry_machines AS lm WHERE lm.id = ls.machine AND lt.id = ls.time AND la.timeslot = ls.id AND la.people_id = :people_id AND la.cyclestart = :cyclestart ORDER BY timeslot', ['people_id' => $data['people_id'], 'cyclestart' => $cyclestart]); -// if(db_numrows($result)) $element['field'] .= '

Current appointments in this cycle'; + // if(db_numrows($result)) $element['field'] .= '

Current appointments in this cycle'; while ($row = db_fetch($result)) { $app[] = ($row['id'] == $_POST['timeslot'] ? '' : '').strftime('%A %d %B %Y', strtotime('+'.$row['day'].' days', strtotime($cyclestart))).', '.$row['label'].' '.$row['machine'].''.($row['id'] == $_POST['timeslot'] ? ' (this one)' : '').($row['noshow'] ? ' NO-SHOW' : ''); } diff --git a/library/ajax/testdbdelete.php b/library/ajax/testdbdelete.php index 51cc9c11..09a11a1b 100644 --- a/library/ajax/testdbdelete.php +++ b/library/ajax/testdbdelete.php @@ -20,7 +20,7 @@ $emails = $_POST['emails']; foreach ($emails as $email) { $found_id = db_value('SELECT id FROM cms_users WHERE email = :email OR (email LIKE :deletedEmail AND deleted IS NOT NULL)', ['email' => $email, 'deletedEmail' => $email.'.deleted%']); - //test necessary, because otherwise null is added to ids + // test necessary, because otherwise null is added to ids if ($found_id) { array_push($ids, $found_id); } @@ -28,9 +28,9 @@ } else { $ids = explode(',', $_POST['ids']); } - //if ids that are submitted are in database, delete them, otherwise just return true + // if ids that are submitted are in database, delete them, otherwise just return true if ([] != $ids) { - //Define all ids which are allowed to be deleted + // Define all ids which are allowed to be deleted $allowed['people'] = array_column(db_array( 'SELECT p.id FROM people p diff --git a/library/core.php b/library/core.php index 9dc7dc08..78fbf43d 100644 --- a/library/core.php +++ b/library/core.php @@ -3,7 +3,7 @@ use OpenCensus\Trace\Tracer; Tracer::inSpan( - ['name' => ('library/core.php')], + ['name' => 'library/core.php'], function () use ($bypassAuthentication, $mobile, $ajax) { global $settings, $lan, $translate, $menusToActions, $rolesToActions; diff --git a/library/error-reporting.php b/library/error-reporting.php index c03fc71a..08b39218 100644 --- a/library/error-reporting.php +++ b/library/error-reporting.php @@ -3,7 +3,7 @@ use OpenCensus\Trace\Tracer; // report errors, but ignore E_STRICT and E_NOTICE -error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_WARNING); +error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); // this behaviour is disabled by default, but can be turned // on if you want to see the warnings diff --git a/library/functions.php b/library/functions.php index 4255e23b..d4aa15f1 100644 --- a/library/functions.php +++ b/library/functions.php @@ -27,7 +27,7 @@ function () use ($hash, $legacy, &$return) { ->setRoundBlockSizeMode(new RoundBlockSizeModeMargin()) ->setForegroundColor(new Color(0, 0, 0)) ->setBackgroundColor(new Color(255, 255, 255)) - ; + ; $result = $writer->write($qrCode); @@ -74,7 +74,7 @@ function generateQRIDForDB() $hash = md5($id); db_query('INSERT INTO qr (id, code, created) VALUES ('.$id.',"'.$hash.'",NOW())'); - //test if generated qr-code is already connected to a box + // test if generated qr-code is already connected to a box if (db_value('SELECT id FROM stock WHERE qr_id = :id', ['id' => $id])) { throw new Exception('QR-Generation error! Please report to the Boxtribute team!'); } @@ -165,7 +165,7 @@ function getcampdata($id) ORDER BY c.seq', ['camp' => $id, 'organisation_id' => $_SESSION['organisation']['id']]); } -//this function verifies if a people id belongs to a camp that the current user has access to. +// this function verifies if a people id belongs to a camp that the current user has access to. function verify_campaccess_people($id) { if (!$id) { @@ -178,7 +178,7 @@ function verify_campaccess_people($id) } } -//this function verifies if a location id belongs to a camp that the current user has access to. +// this function verifies if a location id belongs to a camp that the current user has access to. function verify_campaccess_location($id) { if (!$id) { diff --git a/library/gcloud.php b/library/gcloud.php index 0a153959..4e1a8766 100644 --- a/library/gcloud.php +++ b/library/gcloud.php @@ -35,9 +35,17 @@ function registerGoogleCloudServices($projectId) $hostName = @parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_HOST); $version = $settings['version'] ?? '0'; $settings['upload_dir'] = "gs://{$projectId}.appspot.com/{$hostName}/uploads"; + + // configure session storage + if (!getenv('DISABLE_GCLOUD')) { + ini_set('session.save_path', "sessions-{$projectId}-{$hostName}"); + $datastore = new Google\Cloud\Datastore\DatastoreClient(); + session_set_save_handler(new Google\Cloud\Datastore\DatastoreSessionHandler($datastore), true); + } } $googleProjectId = getenv('GOOGLE_CLOUD_PROJECT'); -if ($googleProjectId) { - registerGoogleCloudServices($googleProjectId); +if (!$googleProjectId) { + throw new Exception('No GOOGLE_CLOUD_PROJECT set'); } +registerGoogleCloudServices($googleProjectId); diff --git a/library/lib/auth0.php b/library/lib/auth0.php index e429890e..b54cc3e1 100644 --- a/library/lib/auth0.php +++ b/library/lib/auth0.php @@ -36,6 +36,7 @@ function getAuth0SdkConfiguration($settings, $apiCall = false) 'scope' => ['openid', 'profile', 'email'], ]); } + /** * Getting Auth0 instance. * @@ -49,6 +50,7 @@ function getAuth0($settings) return new Auth0($configuration); } + /** * Getting Auth0 API Management instance. * @@ -60,8 +62,9 @@ function getAuth0Management($settings) $auth0 = new Auth0($configuration); - return $auth0->management(); //new Management($configuration); + return $auth0->management(); // new Management($configuration); } + /** * Getting Auth0 Authentication instance. * @@ -73,6 +76,7 @@ function getAuth0Authentication($settings) return $auth0->authentication(); } + /** * Deleting user from Auth0. * @@ -177,6 +181,7 @@ function updateAuth0UserFromDb($userId, $setPwd = false) $mgmtAPI->users()->update($auth0UserId, ['password' => $setPwd]); } } + /** * Update user password in Auth0. * @@ -189,6 +194,7 @@ function updateAuth0Password($userId, $password) $mgmtAPI = getAuth0Management($settings); $mgmtAPI->users()->update('auth0|'.intval($userId), ['password' => $password, 'connection' => 'Username-Password-Authentication']); } + /** * Checking if user in DB is in sync with Auth0. * @@ -284,6 +290,7 @@ function isUserInSyncWithAuth0($userId) return $return_value; } + /** * Gett user by email. * @@ -312,6 +319,7 @@ function getAuth0UserByEmail($email) return null; } } + /** * Getting user information from Auth0. * @@ -329,6 +337,7 @@ function getAuth0User($userId) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + /** * Getting roles by base ids. */ @@ -361,6 +370,7 @@ function getRolesByBaseIds(array $baseIds) return $roles; } + /** * Getting roles by name. * @@ -385,6 +395,7 @@ function getRolesByName($roleName) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + /** * Create Role. * @@ -404,6 +415,7 @@ function createRole($roleName) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + /** * Update role in Auth0. * @@ -428,6 +440,7 @@ function updateRole($roleId, $roleName, $roleDescription) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + /** * Update role permissions. * @@ -458,6 +471,7 @@ function updateRolePermissions($roleId, $resourseServerIdentifier, $methods) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + /** * Get all roles. */ @@ -655,6 +669,7 @@ function updateRolesForBase($baseId, $baseName) return true; } + /** * Getting available actions with role name. * @@ -666,6 +681,7 @@ function getMethodByRole($roleName) return $rolesToActions[$roleName]; } + /** * Create or update role and permissions in auth0. * @@ -696,6 +712,7 @@ function createOrUpdateRoleAndPermission($roleName, $prefixedRole, $prefixedRole return $role; } + /** * Getting available menues by role. * @@ -715,6 +732,7 @@ function getMenusByRole($role, array &$rolesToActions, array &$menusToActions) return array_unique($menuIds); } + /** * Assign roles to auth0 user. (it will remove all roles alreadys assigned then add new roles). * @@ -755,6 +773,7 @@ function assignRolesToUser($userId, array $roleIds) throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } } + /** * Getting user assigned roles. * diff --git a/library/lib/csvexport.php b/library/lib/csvexport.php index b33f44ee..19b9d52f 100644 --- a/library/lib/csvexport.php +++ b/library/lib/csvexport.php @@ -14,10 +14,10 @@ function csvexport($data, $filename, $keys) while ($f = db_fetch($data)) { foreach ($keys as $key => $value) { - echo '"'.$f[$key].'"'.','; + echo '"'.$f[$key].'",'; } echo "\n"; } - exit(); + exit; } diff --git a/library/lib/errorhandling.php b/library/lib/errorhandling.php index 4fd6b992..51d5bc98 100644 --- a/library/lib/errorhandling.php +++ b/library/lib/errorhandling.php @@ -118,17 +118,15 @@ function bootstrap_exception_handler(Throwable $ex) 598 => 'Network read timeout error', 599 => 'Network connect timeout error', ]; - // this will only work if there hasn't already been response output - http_response_code($ex->getCode()); + $error = new Zmarty(); if (0 === $ex->getCode() && 'Invalid state' === $ex->getMessage()) { // This will call logout and redirect to renew the session when the authentication login page remains longer than expected trigger_error('The user received an invalid state error since the state code is outdated', E_USER_ERROR); logoutWithRedirect(); - } elseif (500 === $ex->getCode() || !$http_status_codes[$ex->getCode()]) { - $error->assign('title', 'Sorry, something went wrong'); - $error->assign('error', "Sorry, an unexpected error occured and has been reported. Please contact support and quote Sentry #{$eventId}."); - } else { + } elseif (isset($http_status_codes[$ex->getCode()]) && 500 !== $ex->getCode()) { + // We have more context, so display more detail + http_response_code($ex->getCode()); $error->assign('title', $ex->getCode().' - '.$http_status_codes[$ex->getCode()]); $error->assign('error', "{$ex->getMessage()}"); $error->assign('sentry', "For additional information, please contact support and quote Sentry #{$eventId}."); @@ -142,6 +140,11 @@ function bootstrap_exception_handler(Throwable $ex) logout(); $error->assign('logoutWithRedirect', 'https://'.$settings['auth0_domain'].'/v2/logout?client_id='.$settings['auth0_client_id'].'&returnTo='.urlencode($settings['auth0_redirect_uri'])); } + } else { + // Generic error page + http_response_code(500); + $error->assign('title', 'Sorry, something went wrong'); + $error->assign('error', "Sorry, an unexpected error occured and has been reported. Please contact support and quote Sentry #{$eventId}."); } global $settings; @@ -151,7 +154,7 @@ function bootstrap_exception_handler(Throwable $ex) $error->display('cms_error.tpl'); - exit(); + exit; } // Set exception handler @@ -186,11 +189,11 @@ public static function add_error_handler() * * @see http://php.net/set_error_handler * - * @param int $errno Error level - * @param $errstr - * @param $errfile - * @param $errline - * @param $errcontext + * @param int $errno Error level + * @param mixed $errstr + * @param mixed $errfile + * @param mixed $errline + * @param mixed $errcontext * * @return bool */ @@ -214,7 +217,6 @@ public static function boxwise_error_handler($errno, $errstr, $errfile, $errline } // Set error handlers -smarty::muteExpectedErrors(); boxwise_error_handler_class::add_error_handler(); function logfile($content) diff --git a/library/lib/form.php b/library/lib/form.php index 4986e6df..65f0e5d6 100644 --- a/library/lib/form.php +++ b/library/lib/form.php @@ -64,7 +64,7 @@ function addfield($type, $label = false, $field = false, $array = []) } } - //if($key=='selectedtags') $formdata[$field]['selectedtags'] = db_simplearray($value); + // if($key=='selectedtags') $formdata[$field]['selectedtags'] = db_simplearray($value); if ('othertags' == $key) { $array = db_array($value); $values = ''; @@ -79,7 +79,7 @@ function addfield($type, $label = false, $field = false, $array = []) $formdata[$field]['othertags'] = array_unique(explode(',', $values)); natcasesort($formdata[$field]['othertags']); } - //if($key=='othertags') $formdata[$field]['othertags'] = db_simplearray($value); + // if($key=='othertags') $formdata[$field]['othertags'] = db_simplearray($value); } if ($formdata[$field]['date'] && $formdata[$field]['time']) { @@ -111,7 +111,7 @@ function addfield($type, $label = false, $field = false, $array = []) } $formdata[$field]['basename'] = basename($data[$field]); - //Create a JS friendly field ID + // Create a JS friendly field ID $fieldid = str_replace('[', '_', $formdata[$field]['field']); $fieldid = str_replace(']', '', $fieldid); $formdata[$field]['fieldid'] = $fieldid; @@ -178,7 +178,7 @@ function getParentarray($table, $minlevel, $maxlevel, $field, $level = 0, $paren 'parent_id' => $row['parent_id'], 'label' => $row[$field], 'disabled' => ($level < ($minlevel - 1)), - 'level' => ($level) + 1, ]; + 'level' => $level + 1, ]; } if ($maxlevel > $level) { $sub = getParentarray($table, $minlevel, $maxlevel, $field, $level + 1, $row['id']); @@ -191,13 +191,13 @@ function getParentarray($table, $minlevel, $maxlevel, $field, $level = 0, $paren return $parentarray; } -function formatdate($output, $date) -{ - global $translate; + function formatdate($output, $date) + { + global $translate; - $output = str_replace('%A', $translate[strftime('%A', $date)], $output); - $output = str_replace('%B', $translate[strftime('%B', $date)], $output); - $output = strftime($output, $date); + $output = str_replace('%A', $translate[strftime('%A', $date)], $output); + $output = str_replace('%B', $translate[strftime('%B', $date)], $output); + $output = strftime($output, $date); - return $output; -} + return $output; + } diff --git a/library/lib/formhandler.php b/library/lib/formhandler.php index ac97ed5c..34a57a31 100644 --- a/library/lib/formhandler.php +++ b/library/lib/formhandler.php @@ -81,8 +81,8 @@ public function modifyData(&$keys, $lan = false) $aResizeItem['reltarget'] = $aResizeItem['target'].basename($value); $aResizeItem['target'] = $_SERVER['DOCUMENT_ROOT'].$aResizeItem['target'].basename($value); - //If the file already exists, append the target filename with -1 - //This should be in a function that adds -1 as long as the filename exist. (Now only works once) + // If the file already exists, append the target filename with -1 + // This should be in a function that adds -1 as long as the filename exist. (Now only works once) /* if (file_exists($aResizeItem['target'])) { $aPathinfo = pathinfo($aResizeItem['target']); @@ -213,7 +213,7 @@ public function saveChangeHistory() } elseif ('float' == $fields[$key]['Type']) { db_query('INSERT INTO history (tablename, record_id, changes, user_id, ip, changedate, from_float, to_float) VALUES (:table,:id,:change,:user_id,:ip,NOW(), :old, :new)', ['table' => $this->table, 'id' => $this->id, 'change' => $key, 'user_id' => $_SESSION['user']['id'], 'ip' => $_SERVER['REMOTE_ADDR'], 'old' => $old[$key], 'new' => $new]); } else { - $change .= $key.' changed from "'.$old[$key].'" to "'.$new.'"'.'; '; + $change .= $key.' changed from "'.$old[$key].'" to "'.$new.'"; '; db_query('INSERT INTO history (tablename, record_id, changes, user_id, ip, changedate) VALUES (:table,:id,:change,:user_id,:ip,NOW())', ['table' => $this->table, 'id' => $this->id, 'change' => $change, 'user_id' => $_SESSION['user']['id'], 'ip' => $_SERVER['REMOTE_ADDR']]); } } diff --git a/library/lib/list.php b/library/lib/list.php index b9113cb0..08f88faa 100644 --- a/library/lib/list.php +++ b/library/lib/list.php @@ -520,7 +520,7 @@ function initlist() if (isset($_POST['__multiplefilter'])) { if (isset($_POST['multiplefilter'])) { - //sanitize input + // sanitize input $_POST['multiplefilter'] = array_filter($_POST['multiplefilter'], 'ctype_digit'); $listconfig['multiplefilter_selected'] = $_POST['multiplefilter']; $_SESSION['multiplefilter'][$action] = $listconfig['multiplefilter_selected']; @@ -780,19 +780,19 @@ function insertwhere($query, $where) $pos_order = strripos($query, 'ORDER BY'); $pos_group = strripos($query, 'GROUP BY'); $pos_where = strripos($query, 'WHERE'); - if ($pos_group) { //voor het groupstatement + if ($pos_group) { // voor het groupstatement if ($pos_where) { $query = query_insert($query, $pos_group, 'AND '.$where); } else { $query = query_insert($query, $pos_group, 'WHERE '.$where); } - } elseif ($pos_order) { //gewoon erachter + } elseif ($pos_order) { // gewoon erachter if ($pos_where) { $query = query_insert($query, $pos_order, 'AND '.$where); } else { $query = query_insert($query, $pos_order, 'WHERE '.$where); } - } else { //gewoon erachter + } else { // gewoon erachter if ($pos_where) { $query .= ' AND '.$where; } else { @@ -820,7 +820,7 @@ function addcolumn($type, $label = false, $field = false, $array = []) if ($array['query']) { foreach ($data as $key => $value) { - //$data[$key][$field] = db_value($array['query'],array('id'=>$data[$key][$field])); + // $data[$key][$field] = db_value($array['query'],array('id'=>$data[$key][$field])); $data[$key][$field] = db_value($array['query'], ['id' => $data[$key]['id']]); } } diff --git a/library/lib/session.php b/library/lib/session.php index 6b03892d..606bc4b7 100644 --- a/library/lib/session.php +++ b/library/lib/session.php @@ -16,7 +16,7 @@ function authenticate($settings, $ajax) if ($isAuth0Callback && null === $session && $_REQUEST['error']) { throw new Exception($_REQUEST['error_description'], 401); - exit(); + exit; } if (isset($session)) { @@ -205,7 +205,7 @@ function loadSessionDataForUser($user) $_SESSION['camp'] = $camplist[$_SESSION['camp']['id']]; } - if ($user['is_admin'] && isset($_SESSION['camp']['id']) && !isset($_SESSION['organisation']['id'])) { //Boxtribute God who selected a camp before an organisation was specified. + if ($user['is_admin'] && isset($_SESSION['camp']['id']) && !isset($_SESSION['organisation']['id'])) { // Boxtribute God who selected a camp before an organisation was specified. // based on the selected camp the organisation is selected. $_SESSION['organisation'] = organisationlist()[$_SESSION['camp']['organisation_id']]; } diff --git a/library/lib/tools.php b/library/lib/tools.php index e99fe479..c953f2c9 100644 --- a/library/lib/tools.php +++ b/library/lib/tools.php @@ -64,7 +64,7 @@ function showHistory($table, $id) $change = $row['changes']; $change = str_replace(';', '', $change); - //cases for properly created change-messages(location_id, product_id,items...) + // cases for properly created change-messages(location_id, product_id,items...) if (in_array($change, ['location_id', 'product_id', 'items', 'size_id'])) { if ('items' == $change) { $change = 'changed the number of items from '.$row['from_int'].' to '.$row['to_int']; @@ -84,9 +84,9 @@ function showHistory($table, $id) $size_new = db_row('SELECT sizes.label FROM sizes WHERE sizes.id = :id_new', ['id_new' => $size_ids[1]]); $change = 'changed size from '.$size_orig['label'].' to '.$size_new['label']; } - } //Cases where the grammar has to be realigned to make it readable + } // Cases where the grammar has to be realigned to make it readable elseif (in_array(explode(' ', $change)[0], ['Box', 'Record', 'comments', 'signaturefield'])) { - //special cases first + // special cases first $change = trim(grammarRealign($change)); if ('order box made undone' == $change) { $change = 'canceled the order'; @@ -165,7 +165,7 @@ function redirect($url, $status = 301) { header('Location: '.$url, true, $status); - exit(); + exit; } function CMSmenu() @@ -205,14 +205,14 @@ function CMSmenu() if ($row2['include'] == $action || $row2['include'].'_edit' == $action) { $row2['active'] = true; } - if ($row2['title'.'_'.$lan]) { - $row2['title'] = $row2['title'.'_'.$lan]; + if ($row2['title_'.$lan]) { + $row2['title'] = $row2['title_'.$lan]; } $submenu[] = $row2; } - if ($row1['title'.'_'.$lan]) { - $row1['title'] = $row1['title'.'_'.$lan]; + if ($row1['title_'.$lan]) { + $row1['title'] = $row1['title_'.$lan]; } $row1['sub'] = $submenu; if ($submenu) { @@ -287,7 +287,7 @@ function utf8_decode_array($array) function simpleSaveChangeHistory($table, $record, $changes, $from = [], $to = []) { - //from and to variable must be arrays with entry 'int' or 'float' + // from and to variable must be arrays with entry 'int' or 'float' if (!db_tableexists('history')) { return; } @@ -296,7 +296,7 @@ function simpleSaveChangeHistory($table, $record, $changes, $from = [], $to = [] function simpleBulkSaveChangeHistory($table, $records, $changes, $from = [], $to = []) { - //from and to variable must be arrays with entry 'int' or 'float' + // from and to variable must be arrays with entry 'int' or 'float' if (!db_tableexists('history')) { return; } diff --git a/library/lib/translate.php b/library/lib/translate.php index fae962e1..6ecf8ddb 100644 --- a/library/lib/translate.php +++ b/library/lib/translate.php @@ -3,7 +3,7 @@ if (defined('CORE')) { $lan = $settings['cms_language']; - //load global language array + // load global language array if (isset($_SESSION['user']['language'])) { $lan = db_value('SELECT code FROM languages WHERE id = :id', ['id' => $_SESSION['user']['language']]); diff --git a/mobile.php b/mobile.php index 8a8a76bc..f12c75bc 100644 --- a/mobile.php +++ b/mobile.php @@ -38,12 +38,12 @@ $data['messageAnchorTargetValue'] = $_GET['messageAnchorTargetValue']; } if (!$_SESSION['camp']['id']) { - //No organisation selected for admin + // No organisation selected for admin if (!isset($_SESSION['organisation']['id']) && $_SESSION['user']['is_admin']) { require_once 'mobile/selectorganisation.php'; } else { throw new Exception('You don\'t have access to this base. Ask your coordinator to correct this!', 403); - //$data['message'] = 'You don\'t have access to this base. Ask your coordinator to correct this!'; + // $data['message'] = 'You don\'t have access to this base. Ask your coordinator to correct this!'; } } elseif (!db_value('SELECT id FROM locations WHERE locations.type = "Warehouse" AND locations.camp_id = '.intval($_SESSION['camp']['id']).' LIMIT 1 ')) { redirect('/?action=start'); diff --git a/mobile/findbox.php b/mobile/findbox.php index 9ea41917..7c8fcee5 100644 --- a/mobile/findbox.php +++ b/mobile/findbox.php @@ -15,4 +15,4 @@ redirect('?barcode=&warning=1&message='.$message); } - exit(); + exit; diff --git a/mobile/move.php b/mobile/move.php index a98f5890..0ac18201 100644 --- a/mobile/move.php +++ b/mobile/move.php @@ -22,4 +22,4 @@ db_query('INSERT INTO itemsout (product_id, size_id, count, movedate, from_location, to_location) VALUES ('.$box['product_id'].','.$box['size_id'].','.$box['items'].',NOW(),'.$box['location_id'].','.$newlocation['id'].')'); } - redirect('?message='.'Box '.$box['box_id'].' contains '.$box['items'].'x '.$box['product'].' is moved from '.$box['location'].' to '.$newlocation['label'].'.&messageAnchorText=Go back to this box&messageAnchorTarget=boxid&messageAnchorTargetValue='.$box['id']); + redirect('?message=Box '.$box['box_id'].' contains '.$box['items'].'x '.$box['product'].' is moved from '.$box['location'].' to '.$newlocation['label'].'.&messageAnchorText=Go back to this box&messageAnchorTarget=boxid&messageAnchorTargetValue='.$box['id']); diff --git a/mobile/savebox.php b/mobile/savebox.php index 742f67eb..73b0f634 100644 --- a/mobile/savebox.php +++ b/mobile/savebox.php @@ -32,7 +32,7 @@ // Updates and Preparation if ($new) { Tracer::inSpan( - ['name' => ('mobile/savebox.php:Box ID Generation')], + ['name' => 'mobile/savebox.php:Box ID Generation'], function () { do { $_POST['box_id'] = generateBoxID(); diff --git a/mobile/vieworders.php b/mobile/vieworders.php index f4a7a1d2..9fd51750 100644 --- a/mobile/vieworders.php +++ b/mobile/vieworders.php @@ -1,11 +1,11 @@ intval($_GET['picked']), 'user' => $_SESSION['user']['id']]); simpleSaveChangeHistory('stock', $_GET['picked'], 'Box picked from warehouse '); } - //a box is lost + // a box is lost if ($_GET['lost']) { $from['int'] = db_value('SELECT location_id FROM stock WHERE id = :id', ['id' => intval($_GET['lost'])]); $to['int'] = db_value('SELECT id FROM locations WHERE deleted IS NULL AND camp_id = :camp AND is_lost = 1 AND type = "Warehouse" LIMIT 1', ['camp' => $_SESSION['camp']['id']]); diff --git a/pdf/bicyclecard.php b/pdf/bicyclecard.php index 8043cdc3..53c3ceb0 100644 --- a/pdf/bicyclecard.php +++ b/pdf/bicyclecard.php @@ -22,7 +22,7 @@ $pdf->SetAutoPageBreak(false); $pdf->SetLineWidth(0.1); -//$id = "1050,1067,1068,1084,1093"; +// $id = "1050,1067,1068,1084,1093"; $ids = explode(',', $_GET['id']); foreach ($ids as $key => $id) { $ids[$key] = intval($id); @@ -105,7 +105,7 @@ $photox = 4; $photoy = 10; - //dump($imgw); + // dump($imgw); $pdf->ClippingRect($pdf->X + $photox, $pdf->Y + $photoy, $photow, $photoh, 1); if ($rotate) { $pdf->Rotate($rotate, $pdf->X + $photox + ($photow / 2), $pdf->Y + $photoy + ($photoh / 2)); diff --git a/pdf/dryfood.php b/pdf/dryfood.php index 041c4f9c..47fd639d 100644 --- a/pdf/dryfood.php +++ b/pdf/dryfood.php @@ -72,7 +72,7 @@ function Writename($person) if (is_null($person['age'])) { $person['age'] = '?'; } - $pdf->SetFont('helvetica', ($person['parent_id'] ? '' : 'B'), 10); + $pdf->SetFont('helvetica', $person['parent_id'] ? '' : 'B', 10); $parent = ($person['parent_id'] ? 4 : 0); diff --git a/pdf/fpdf.php b/pdf/fpdf.php index ae4f1047..4918097a 100755 --- a/pdf/fpdf.php +++ b/pdf/fpdf.php @@ -13,64 +13,64 @@ class FPDF { protected $page; // current page number protected $n; // current object number -protected $offsets; // array of object offsets -protected $buffer; // buffer holding in-memory PDF -protected $pages; // array containing pages -protected $state; // current document state -protected $compress; // compression flag -protected $k; // scale factor (number of points in user unit) -protected $DefOrientation; // default orientation -protected $CurOrientation; // current orientation -protected $StdPageSizes; // standard page sizes -protected $DefPageSize; // default page size -protected $CurPageSize; // current page size -protected $CurRotation; // current page rotation -protected $PageInfo; // page-related data -protected $wPt; + protected $offsets; // array of object offsets + protected $buffer; // buffer holding in-memory PDF + protected $pages; // array containing pages + protected $state; // current document state + protected $compress; // compression flag + protected $k; // scale factor (number of points in user unit) + protected $DefOrientation; // default orientation + protected $CurOrientation; // current orientation + protected $StdPageSizes; // standard page sizes + protected $DefPageSize; // default page size + protected $CurPageSize; // current page size + protected $CurRotation; // current page rotation + protected $PageInfo; // page-related data + protected $wPt; protected $hPt; // dimensions of current page in points protected $w; protected $h; // dimensions of current page in user unit -protected $lMargin; // left margin -protected $tMargin; // top margin -protected $rMargin; // right margin -protected $bMargin; // page break margin -protected $cMargin; // cell margin -protected $x; + protected $lMargin; // left margin + protected $tMargin; // top margin + protected $rMargin; // right margin + protected $bMargin; // page break margin + protected $cMargin; // cell margin + protected $x; protected $y; // current position in user unit -protected $lasth; // height of last printed cell -protected $LineWidth; // line width in user unit -protected $fontpath; // path containing fonts -protected $CoreFonts; // array of core font names -protected $fonts; // array of used fonts -protected $FontFiles; // array of font files -protected $encodings; // array of encodings -protected $cmaps; // array of ToUnicode CMaps -protected $FontFamily; // current font family -protected $FontStyle; // current font style -protected $underline; // underlining flag -protected $CurrentFont; // current font info -protected $FontSizePt; // current font size in points -protected $FontSize; // current font size in user unit -protected $DrawColor; // commands for drawing color -protected $FillColor; // commands for filling color -protected $TextColor; // commands for text color -protected $ColorFlag; // indicates whether fill and text colors are different -protected $WithAlpha; // indicates whether alpha channel is used -protected $ws; // word spacing -protected $images; // array of used images -protected $PageLinks; // array of links in pages -protected $links; // array of internal links -protected $AutoPageBreak; // automatic page breaking -protected $PageBreakTrigger; // threshold used to trigger page breaks -protected $InHeader; // flag set when processing header -protected $InFooter; // flag set when processing footer -protected $AliasNbPages; // alias for total number of pages -protected $ZoomMode; // zoom display mode -protected $LayoutMode; // layout display mode -protected $metadata; // document properties -protected $PDFVersion; // PDF version number - -// Public methods + protected $lasth; // height of last printed cell + protected $LineWidth; // line width in user unit + protected $fontpath; // path containing fonts + protected $CoreFonts; // array of core font names + protected $fonts; // array of used fonts + protected $FontFiles; // array of font files + protected $encodings; // array of encodings + protected $cmaps; // array of ToUnicode CMaps + protected $FontFamily; // current font family + protected $FontStyle; // current font style + protected $underline; // underlining flag + protected $CurrentFont; // current font info + protected $FontSizePt; // current font size in points + protected $FontSize; // current font size in user unit + protected $DrawColor; // commands for drawing color + protected $FillColor; // commands for filling color + protected $TextColor; // commands for text color + protected $ColorFlag; // indicates whether fill and text colors are different + protected $WithAlpha; // indicates whether alpha channel is used + protected $ws; // word spacing + protected $images; // array of used images + protected $PageLinks; // array of links in pages + protected $links; // array of internal links + protected $AutoPageBreak; // automatic page breaking + protected $PageBreakTrigger; // threshold used to trigger page breaks + protected $InHeader; // flag set when processing header + protected $InFooter; // flag set when processing footer + protected $AliasNbPages; // alias for total number of pages + protected $ZoomMode; // zoom display mode + protected $LayoutMode; // layout display mode + protected $metadata; // document properties + protected $PDFVersion; // PDF version number + + // Public methods public function __construct($orientation = 'P', $unit = 'mm', $size = 'A4') { @@ -1035,46 +1035,46 @@ public function Output($dest = '', $name = '', $isUTF8 = false) } switch (strtoupper($dest)) { - case 'I': - // Send to standard output - $this->_checkoutput(); - if (PHP_SAPI != 'cli') { - // We send to a browser - header('Content-Type: application/pdf'); - header('Content-Disposition: inline; '.$this->_httpencode('filename', $name, $isUTF8)); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - } - echo $this->buffer; + case 'I': + // Send to standard output + $this->_checkoutput(); + if (PHP_SAPI != 'cli') { + // We send to a browser + header('Content-Type: application/pdf'); + header('Content-Disposition: inline; '.$this->_httpencode('filename', $name, $isUTF8)); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + } + echo $this->buffer; - break; + break; - case 'D': - // Download file - $this->_checkoutput(); - header('Content-Type: application/x-download'); - header('Content-Disposition: attachment; '.$this->_httpencode('filename', $name, $isUTF8)); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - echo $this->buffer; + case 'D': + // Download file + $this->_checkoutput(); + header('Content-Type: application/x-download'); + header('Content-Disposition: attachment; '.$this->_httpencode('filename', $name, $isUTF8)); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + echo $this->buffer; - break; + break; - case 'F': - // Save to local file - if (!file_put_contents($name, $this->buffer)) { - $this->Error('Unable to create output file: '.$name); - } + case 'F': + // Save to local file + if (!file_put_contents($name, $this->buffer)) { + $this->Error('Unable to create output file: '.$name); + } - break; + break; - case 'S': - // Return as a string - return $this->buffer; + case 'S': + // Return as a string + return $this->buffer; - default: - $this->Error('Incorrect output destination: '.$dest); - } + default: + $this->Error('Incorrect output destination: '.$dest); + } return ''; } diff --git a/pdf/pdf-card.php b/pdf/pdf-card.php index eb50713c..c9ec572d 100644 --- a/pdf/pdf-card.php +++ b/pdf/pdf-card.php @@ -71,7 +71,7 @@ public function ClippingRoundedRect($x, $y, $w, $h, $r, $outline = false) $this->_Arc($xc - $r * $MyArc, $yc + $r, $xc - $r, $yc + $r * $MyArc, $xc - $r, $yc); $xc = $x + $r; $yc = $y + $r; - $this->_out(sprintf('%.2F %.2F l', ($x) * $k, ($hp - $yc) * $k)); + $this->_out(sprintf('%.2F %.2F l', $x * $k, ($hp - $yc) * $k)); $this->_Arc($xc - $r, $yc - $r * $MyArc, $xc - $r * $MyArc, $yc - $r, $xc, $yc - $r); $this->_out(' W '.$op); } @@ -195,7 +195,7 @@ public function _endpage() public function SetDrawColor() { - //Set color for all stroking operations + // Set color for all stroking operations switch (func_num_args()) { case 1: $g = func_get_arg(0); @@ -230,7 +230,7 @@ public function SetDrawColor() public function SetFillColor() { - //Set color for all filling operations + // Set color for all filling operations switch (func_num_args()) { case 1: $g = func_get_arg(0); @@ -266,7 +266,7 @@ public function SetFillColor() public function SetTextColor() { - //Set color for text + // Set color for text switch (func_num_args()) { case 1: $g = func_get_arg(0); @@ -341,13 +341,13 @@ public function NewPage() $this->Y = $this->TopMargin; } - //Cell with horizontal scaling if text is too wide + // Cell with horizontal scaling if text is too wide public function CellFit($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $scale = false, $force = true) { - //Get string width + // Get string width $str_width = $this->GetStringWidth($txt); - //Calculate ratio to fit cell + // Calculate ratio to fit cell if (0 == $w) { $w = $this->w - $this->rMargin - $this->x; } @@ -356,55 +356,55 @@ public function CellFit($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '' $fit = ($ratio < 1 || ($ratio > 1 && $force)); if ($fit) { if ($scale) { - //Calculate horizontal scaling + // Calculate horizontal scaling $horiz_scale = $ratio * 100.0; - //Set horizontal scaling + // Set horizontal scaling $this->_out(sprintf('BT %.2F Tz ET', $horiz_scale)); } else { - //Calculate character spacing in points + // Calculate character spacing in points $char_space = ($w - $this->cMargin * 2 - $str_width) / max($this->MBGetStringLength($txt) - 1, 1) * $this->k; - //Set character spacing + // Set character spacing $this->_out(sprintf('BT %.2F Tc ET', $char_space)); } - //Override user alignment (since text will fill up cell) + // Override user alignment (since text will fill up cell) $align = ''; } - //Pass on to Cell method + // Pass on to Cell method $this->Cell($w, $h, $txt, $border, $ln, $align, $fill, $link); - //Reset character spacing/horizontal scaling + // Reset character spacing/horizontal scaling if ($fit) { $this->_out('BT '.($scale ? '100 Tz' : '0 Tc').' ET'); } } - //Cell with horizontal scaling only if necessary + // Cell with horizontal scaling only if necessary public function CellFitScale($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, false); } - //Cell with horizontal scaling always + // Cell with horizontal scaling always public function CellFitScaleForce($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, true); } - //Cell with character spacing only if necessary + // Cell with character spacing only if necessary public function CellFitSpace($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, false); } - //Cell with character spacing always + // Cell with character spacing always public function CellFitSpaceForce($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { - //Same as calling CellFit directly + // Same as calling CellFit directly $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, true); } - //Patch to also work with CJK double-byte text + // Patch to also work with CJK double-byte text public function MBGetStringLength($s) { if ('Type0' == $this->CurrentFont['type']) { @@ -451,7 +451,7 @@ function shorten($text, $length, $span = true, $isHTML = false) if (strlen(strip_tags($output)) < strlen(strip_tags($text))) { $one = utf8_substr($output, 0, strrpos($output, ' ')); - $two = utf8_substr($output, strrpos($output, ' '), (strlen($output) - strrpos($output, ' '))); + $two = utf8_substr($output, strrpos($output, ' '), strlen($output) - strrpos($output, ' ')); preg_match_all('/<(.*?)>/s', $two, $tags); if (strlen($text) > $length) { $one .= $suffix; diff --git a/pdf/pdf.php b/pdf/pdf.php index fb4b02cf..ee436edb 100644 --- a/pdf/pdf.php +++ b/pdf/pdf.php @@ -72,13 +72,13 @@ public function NewPage($lastcontainer = '') $this->Cell(5, 4, $lastcontainer); } - //Cell with horizontal scaling if text is too wide + // Cell with horizontal scaling if text is too wide public function CellFit($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $scale = false, $force = true) { - //Get string width + // Get string width $str_width = $this->GetStringWidth($txt); - //Calculate ratio to fit cell + // Calculate ratio to fit cell if (0 == $w) { $w = $this->w - $this->rMargin - $this->x; } @@ -87,55 +87,55 @@ public function CellFit($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '' $fit = ($ratio < 1 || ($ratio > 1 && $force)); if ($fit) { if ($scale) { - //Calculate horizontal scaling + // Calculate horizontal scaling $horiz_scale = $ratio * 100.0; - //Set horizontal scaling + // Set horizontal scaling $this->_out(sprintf('BT %.2F Tz ET', $horiz_scale)); } else { - //Calculate character spacing in points + // Calculate character spacing in points $char_space = ($w - $this->cMargin * 2 - $str_width) / max($this->MBGetStringLength($txt) - 1, 1) * $this->k; - //Set character spacing + // Set character spacing $this->_out(sprintf('BT %.2F Tc ET', $char_space)); } - //Override user alignment (since text will fill up cell) + // Override user alignment (since text will fill up cell) $align = ''; } - //Pass on to Cell method + // Pass on to Cell method $this->Cell($w, $h, $txt, $border, $ln, $align, $fill, $link); - //Reset character spacing/horizontal scaling + // Reset character spacing/horizontal scaling if ($fit) { $this->_out('BT '.($scale ? '100 Tz' : '0 Tc').' ET'); } } - //Cell with horizontal scaling only if necessary + // Cell with horizontal scaling only if necessary public function CellFitScale($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, false); } - //Cell with horizontal scaling always + // Cell with horizontal scaling always public function CellFitScaleForce($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, true); } - //Cell with character spacing only if necessary + // Cell with character spacing only if necessary public function CellFitSpace($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, false); } - //Cell with character spacing always + // Cell with character spacing always public function CellFitSpaceForce($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { - //Same as calling CellFit directly + // Same as calling CellFit directly $this->CellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, true); } - //Patch to also work with CJK double-byte text + // Patch to also work with CJK double-byte text public function MBGetStringLength($s) { if ('Type0' == $this->CurrentFont['type']) { @@ -182,7 +182,7 @@ function shorten($text, $length, $span = true, $isHTML = false) if (strlen(strip_tags($output)) < strlen(strip_tags($text))) { $one = utf8_substr($output, 0, strrpos($output, ' ')); - $two = utf8_substr($output, strrpos($output, ' '), (strlen($output) - strrpos($output, ' '))); + $two = utf8_substr($output, strrpos($output, ' '), strlen($output) - strrpos($output, ' ')); preg_match_all('/<(.*?)>/s', $two, $tags); if (strlen($text) > $length) { $one .= $suffix; diff --git a/pdf/qr.php b/pdf/qr.php index 3217850e..2f9e4908 100644 --- a/pdf/qr.php +++ b/pdf/qr.php @@ -22,10 +22,10 @@ function () { $pdf->AddFont('helvetica', 'BI', 'helveticabi.php'); // Add Open Sans Fonts variations - $pdf->AddFont('opensans', '', 'OpenSans-Regular.php'); //Regular - $pdf->AddFont('opensans', 'B', 'OpenSans-Bold.php'); //Bold - $pdf->AddFont('opensans', 'I', 'OpenSans-Italic.php'); //Italic - $pdf->AddFont('opensans', 'BI', 'OpenSans-BoldItalic.php'); //Bold_Italic + $pdf->AddFont('opensans', '', 'OpenSans-Regular.php'); // Regular + $pdf->AddFont('opensans', 'B', 'OpenSans-Bold.php'); // Bold + $pdf->AddFont('opensans', 'I', 'OpenSans-Italic.php'); // Italic + $pdf->AddFont('opensans', 'BI', 'OpenSans-BoldItalic.php'); // Bold_Italic $pdf->SetFont('opensans', '', 9); $pdf->SetAutoPageBreak(false); @@ -40,7 +40,7 @@ function () { $pdf->AddPage(); $y = 0; } else { - //$pdf->Line(0,148.5,210,148.5); + // $pdf->Line(0,148.5,210,148.5); $y = 148.5; } @@ -67,7 +67,7 @@ function () { // Optimise query for updating history simpleBulkSaveChangeHistory('qr', $id, 'New QR-code generated by pdf'); - //test if generated qr-code is already connected to a box + // test if generated qr-code is already connected to a box if (db_value('SELECT id FROM stock WHERE qr_id = :id', ['id' => $id])) { throw new Exception('QR-Generation error! Please report to the Boxtribute team!'); } @@ -116,9 +116,9 @@ function () { $pdf->SetXY(138, $y + 122); $pdf->CellFit(60, 0, $box['size'], 0, 0, 'L', false, '', true, false); - //$pdf->Text(40,$y+77,); - //$pdf->Text(10,$y+127,$box['gender']); - //$pdf->Text(140, + // $pdf->Text(40,$y+77,); + // $pdf->Text(10,$y+127,$box['gender']); + // $pdf->Text(140, } } @@ -130,17 +130,17 @@ function remoteFileExists($url) { $curl = curl_init($url); - //don't fetch the actual page, you only want to check the connection is ok + // don't fetch the actual page, you only want to check the connection is ok curl_setopt($curl, CURLOPT_NOBODY, true); - //do request + // do request $result = curl_exec($curl); $ret = false; - //if request did not fail + // if request did not fail if (false !== $result) { - //if request was ok, check response code + // if request was ok, check response code $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); if (200 == $statusCode) { diff --git a/pdf/workshopcard.php b/pdf/workshopcard.php index 77076a2f..ec30ab6c 100644 --- a/pdf/workshopcard.php +++ b/pdf/workshopcard.php @@ -24,7 +24,7 @@ $pdf->SetAutoPageBreak(false); $pdf->SetLineWidth(0.1); -//$id = "1050,1067,1068,1084,1093"; +// $id = "1050,1067,1068,1084,1093"; $ids = explode(',', $_GET['id']); foreach ($ids as $key => $id) { $ids[$key] = intval($id); @@ -77,7 +77,7 @@ $photox = 4; $photoy = 10; - //dump($imgw); + // dump($imgw); $pdf->ClippingRect($pdf->X + $photox, $pdf->Y + $photoy, $photow, $photoh, 1); if ($rotate) { $pdf->Rotate($rotate, $pdf->X + $photox + ($photow / 2), $pdf->Y + $photoy + ($photoh / 2)); diff --git a/php.ini b/php.ini index 0edd6364..e8e47c55 100644 --- a/php.ini +++ b/php.ini @@ -1,9 +1,7 @@ short_open_tag = On -; required for smarty templates in google cloud -allow_url_include = "1" ; unfortunately it seems this has to be hard coded for now ; as the documented #default# shortcut doesn't work google_app_engine.allow_include_gs_buckets = "dropapp-242214.appspot.com" -; this configuration for Google cloud error reporting did not work anymore and we moved it now to gcloud-entry.php -; auto_prepend_file=/vendor/google/cloud-error-reporting/src/prepend.php +; Google cloud error reporting +auto_prepend_file=vendor/google/cloud-error-reporting/src/prepend.php extension=opencensus.so \ No newline at end of file