Created
June 11, 2024 08:37
-
-
Save danslo/edac43b7200a993a56d5578d52478966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Common subdirectories: ../244p8/./vendor/wikimedia/less.php/bin and ./vendor/wikimedia/less.php/bin | |
Common subdirectories: ../244p8/./vendor/wikimedia/less.php/lib and ./vendor/wikimedia/less.php/lib | |
Common subdirectories: ../244p8/./vendor/mtdowling/jmespath.php/bin and ./vendor/mtdowling/jmespath.php/bin | |
Common subdirectories: ../244p8/./vendor/mtdowling/jmespath.php/src and ./vendor/mtdowling/jmespath.php/src | |
--- ../244p8/./vendor/composer/autoload_psr4.php 2024-06-11 10:35:20.813889928 +0200 | |
+++ ./vendor/composer/autoload_psr4.php 2024-06-11 10:35:28.822886888 +0200 | |
@@ -48,7 +48,7 @@ | |
'ReCaptcha\\' => array($vendorDir . '/google/recaptcha/src/ReCaptcha'), | |
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), | |
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'), | |
- 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), | |
+ 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), | |
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), | |
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), | |
'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), | |
--- ../244p8/./vendor/composer/installed.php 2024-06-11 10:35:20.501890064 +0200 | |
+++ ./vendor/composer/installed.php 2024-06-11 10:35:28.366887041 +0200 | |
@@ -1,8 +1,8 @@ | |
<?php return array( | |
'root' => array( | |
'name' => 'magento/project-community-edition', | |
- 'pretty_version' => '2.4.4-p8', | |
- 'version' => '2.4.4.0-patch8', | |
+ 'pretty_version' => '2.4.4-p9', | |
+ 'version' => '2.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'project', | |
'install_path' => __DIR__ . '/../../', | |
@@ -569,9 +569,9 @@ | |
'dev_requirement' => false, | |
), | |
'laminas/laminas-di' => array( | |
- 'pretty_version' => '3.14.0', | |
- 'version' => '3.14.0.0', | |
- 'reference' => '63d86f64ccfa6c4f49e534e312cc89ca613ba3c5', | |
+ 'pretty_version' => '3.3.0', | |
+ 'version' => '3.3.0.0', | |
+ 'reference' => '83330af17fc2511231e805a3586d51883a452094', | |
'type' => 'library', | |
'install_path' => __DIR__ . '/../laminas/laminas-di', | |
'aliases' => array(), | |
@@ -827,8 +827,8 @@ | |
), | |
), | |
'magento/adobe-ims' => array( | |
- 'pretty_version' => '2.1.3-p8', | |
- 'version' => '2.1.3.0-patch8', | |
+ 'pretty_version' => '2.1.3-p9', | |
+ 'version' => '2.1.3.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -836,8 +836,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/adobe-stock-integration' => array( | |
- 'pretty_version' => '2.1.3-p8', | |
- 'version' => '2.1.3.0-patch8', | |
+ 'pretty_version' => '2.1.3-p9', | |
+ 'version' => '2.1.3.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -872,8 +872,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/framework' => array( | |
- 'pretty_version' => '103.0.4-p8', | |
- 'version' => '103.0.4.0-patch8', | |
+ 'pretty_version' => '103.0.4-p9', | |
+ 'version' => '103.0.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-library', | |
'install_path' => __DIR__ . '/../magento/framework', | |
@@ -926,8 +926,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/inventory-metapackage' => array( | |
- 'pretty_version' => '1.2.4-p8', | |
- 'version' => '1.2.4.0-patch8', | |
+ 'pretty_version' => '1.2.4-p9', | |
+ 'version' => '1.2.4.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -1016,8 +1016,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/magento2-base' => array( | |
- 'pretty_version' => '2.4.4-p8', | |
- 'version' => '2.4.4.0-patch8', | |
+ 'pretty_version' => '2.4.4-p9', | |
+ 'version' => '2.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-component', | |
'install_path' => __DIR__ . '/../magento/magento2-base', | |
@@ -1034,8 +1034,8 @@ | |
'dev_requirement' => true, | |
), | |
'magento/module-admin-analytics' => array( | |
- 'pretty_version' => '100.4.4', | |
- 'version' => '100.4.4.0', | |
+ 'pretty_version' => '100.4.4-p9', | |
+ 'version' => '100.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-admin-analytics', | |
@@ -1124,8 +1124,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-adobe-stock-image-admin-ui' => array( | |
- 'pretty_version' => '1.3.2-p8', | |
- 'version' => '1.3.2.0-patch8', | |
+ 'pretty_version' => '1.3.2-p9', | |
+ 'version' => '1.3.2.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-adobe-stock-image-admin-ui', | |
@@ -1223,8 +1223,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-backend' => array( | |
- 'pretty_version' => '102.0.4-p3', | |
- 'version' => '102.0.4.0-patch3', | |
+ 'pretty_version' => '102.0.4-p9', | |
+ 'version' => '102.0.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-backend', | |
@@ -1439,8 +1439,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-checkout' => array( | |
- 'pretty_version' => '100.4.4-p7', | |
- 'version' => '100.4.4.0-patch7', | |
+ 'pretty_version' => '100.4.4-p9', | |
+ 'version' => '100.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-checkout', | |
@@ -1592,8 +1592,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-csp' => array( | |
- 'pretty_version' => '100.4.3', | |
- 'version' => '100.4.3.0', | |
+ 'pretty_version' => '100.4.3-p9', | |
+ 'version' => '100.4.3.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-csp', | |
@@ -1610,8 +1610,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-customer' => array( | |
- 'pretty_version' => '103.0.4-p8', | |
- 'version' => '103.0.4.0-patch8', | |
+ 'pretty_version' => '103.0.4-p9', | |
+ 'version' => '103.0.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-customer', | |
@@ -2321,8 +2321,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-inventory-in-store-pickup-sales-api' => array( | |
- 'pretty_version' => '1.1.1', | |
- 'version' => '1.1.1.0', | |
+ 'pretty_version' => '1.1.1-p9', | |
+ 'version' => '1.1.1.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-inventory-in-store-pickup-sales-api', | |
@@ -3032,8 +3032,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-page-builder' => array( | |
- 'pretty_version' => '2.2.2-p7', | |
- 'version' => '2.2.2.0-patch7', | |
+ 'pretty_version' => '2.2.2-p9', | |
+ 'version' => '2.2.2.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-page-builder', | |
@@ -3086,8 +3086,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-paypal' => array( | |
- 'pretty_version' => '101.0.4', | |
- 'version' => '101.0.4.0', | |
+ 'pretty_version' => '101.0.4-p9', | |
+ 'version' => '101.0.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-paypal', | |
@@ -3140,8 +3140,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-quote' => array( | |
- 'pretty_version' => '101.2.4-p4', | |
- 'version' => '101.2.4.0-patch4', | |
+ 'pretty_version' => '101.2.4-p9', | |
+ 'version' => '101.2.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-quote', | |
@@ -3500,8 +3500,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-sales' => array( | |
- 'pretty_version' => '103.0.4-p7', | |
- 'version' => '103.0.4.0-patch7', | |
+ 'pretty_version' => '103.0.4-p9', | |
+ 'version' => '103.0.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-sales', | |
@@ -3851,8 +3851,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/module-webapi' => array( | |
- 'pretty_version' => '100.4.3', | |
- 'version' => '100.4.3.0', | |
+ 'pretty_version' => '100.4.3-p9', | |
+ 'version' => '100.4.3.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../magento/module-webapi', | |
@@ -3932,8 +3932,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/page-builder' => array( | |
- 'pretty_version' => '1.7.1-p8', | |
- 'version' => '1.7.1.0-patch8', | |
+ 'pretty_version' => '1.7.1-p9', | |
+ 'version' => '1.7.1.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -3941,8 +3941,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/product-community-edition' => array( | |
- 'pretty_version' => '2.4.4-p8', | |
- 'version' => '2.4.4.0-patch8', | |
+ 'pretty_version' => '2.4.4-p9', | |
+ 'version' => '2.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -3950,8 +3950,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/project-community-edition' => array( | |
- 'pretty_version' => '2.4.4-p8', | |
- 'version' => '2.4.4.0-patch8', | |
+ 'pretty_version' => '2.4.4-p9', | |
+ 'version' => '2.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'project', | |
'install_path' => __DIR__ . '/../../', | |
@@ -3959,8 +3959,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/security-package' => array( | |
- 'pretty_version' => '1.1.3-p8', | |
- 'version' => '1.1.3.0-patch8', | |
+ 'pretty_version' => '1.1.3-p9', | |
+ 'version' => '1.1.3.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -3977,8 +3977,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/theme-frontend-blank' => array( | |
- 'pretty_version' => '100.4.4', | |
- 'version' => '100.4.4.0', | |
+ 'pretty_version' => '100.4.4-p9', | |
+ 'version' => '100.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-theme', | |
'install_path' => __DIR__ . '/../magento/theme-frontend-blank', | |
@@ -3986,8 +3986,8 @@ | |
'dev_requirement' => false, | |
), | |
'magento/theme-frontend-luma' => array( | |
- 'pretty_version' => '100.4.4', | |
- 'version' => '100.4.4.0', | |
+ 'pretty_version' => '100.4.4-p9', | |
+ 'version' => '100.4.4.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-theme', | |
'install_path' => __DIR__ . '/../magento/theme-frontend-luma', | |
@@ -4067,8 +4067,8 @@ | |
'dev_requirement' => false, | |
), | |
'paypal/module-braintree' => array( | |
- 'pretty_version' => '4.3.0-p1', | |
- 'version' => '4.3.0.0-patch1', | |
+ 'pretty_version' => '4.3.0-p9', | |
+ 'version' => '4.3.0.0-patch9', | |
'reference' => null, | |
'type' => 'metapackage', | |
'install_path' => null, | |
@@ -4076,8 +4076,8 @@ | |
'dev_requirement' => false, | |
), | |
'paypal/module-braintree-core' => array( | |
- 'pretty_version' => '4.3.0-p1', | |
- 'version' => '4.3.0.0-patch1', | |
+ 'pretty_version' => '4.3.0-p9', | |
+ 'version' => '4.3.0.0-patch9', | |
'reference' => null, | |
'type' => 'magento2-module', | |
'install_path' => __DIR__ . '/../paypal/module-braintree-core', | |
@@ -4368,9 +4368,9 @@ | |
), | |
), | |
'psr/log' => array( | |
- 'pretty_version' => '2.0.0', | |
- 'version' => '2.0.0.0', | |
- 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', | |
+ 'pretty_version' => '1.1.4', | |
+ 'version' => '1.1.4.0', | |
+ 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', | |
'type' => 'library', | |
'install_path' => __DIR__ . '/../psr/log', | |
'aliases' => array(), | |
--- ../244p8/./vendor/composer/autoload_files.php 2024-06-11 10:35:20.815889927 +0200 | |
+++ ./vendor/composer/autoload_files.php 2024-06-11 10:35:28.824886888 +0200 | |
@@ -24,7 +24,6 @@ | |
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', | |
'07ec02c7e667fdcb3e30c02cc772b743' => $vendorDir . '/magento/framework/registration.php', | |
'fbcc86ec9185efc54c1e806bbb33c954' => $vendorDir . '/magento/module-store/registration.php', | |
- '07f4b29581a907da6d366307f545041b' => $vendorDir . '/magento/module-user/registration.php', | |
'3d9d6f82d2fa20ee6036e230ae5c2fff' => $vendorDir . '/magento/module-ui/registration.php', | |
'47402ddfee46771bcf36e616cf38b137' => $vendorDir . '/magento/module-variable/registration.php', | |
'abdeab164c8404da5b237afbed559c74' => $vendorDir . '/magento/module-widget/registration.php', | |
@@ -33,20 +32,16 @@ | |
'6c89c3a060d2d522c8a81f44a7918e32' => $vendorDir . '/magento/module-sales-sequence/registration.php', | |
'571be93292212396d8ebf8febc7bed8f' => $vendorDir . '/magento/module-wishlist/registration.php', | |
'a402dea5ff0872fb10e6b9910d2dd108' => $vendorDir . '/magento/module-sales/registration.php', | |
- '53814a716d73013b1489c928a2cb4164' => $vendorDir . '/magento/module-shipping/registration.php', | |
- 'b6b63f684deb9dbde7a9fc9f251c982b' => $vendorDir . '/magento/module-tax/registration.php', | |
- 'fdc62965dd362c599fddb5bfff3d1e54' => $vendorDir . '/magento/module-quote/registration.php', | |
'81a6edf4c0f44fc1194f4d0362aa4102' => $vendorDir . '/magento/module-backend/registration.php', | |
'f1296a4c3cc1525765fa1e180a2a4ca8' => $vendorDir . '/magento/module-backend/cli_commands.php', | |
- '41e3c70b13a38be15b2f71a5ab57282e' => $vendorDir . '/magento/module-cron/registration.php', | |
- '8751700fbc137cc374c0c964e6f7a3d1' => $vendorDir . '/magento/module-config/registration.php', | |
'18a9d3b717442a10d28b3171b35bea25' => $vendorDir . '/magento/module-authorization/registration.php', | |
+ '07f4b29581a907da6d366307f545041b' => $vendorDir . '/magento/module-user/registration.php', | |
+ '53814a716d73013b1489c928a2cb4164' => $vendorDir . '/magento/module-shipping/registration.php', | |
+ 'b6b63f684deb9dbde7a9fc9f251c982b' => $vendorDir . '/magento/module-tax/registration.php', | |
+ 'fdc62965dd362c599fddb5bfff3d1e54' => $vendorDir . '/magento/module-quote/registration.php', | |
'39607b7536d6ce26556aaeb1275f82dd' => $vendorDir . '/magento/framework-bulk/registration.php', | |
- 'f894a74ac14b8468d8e4ce96b23e46c2' => $vendorDir . '/magento/module-directory/registration.php', | |
'c15dd04b8a7893b89b5f554d9cb0778e' => $vendorDir . '/magento/framework-message-queue/registration.php', | |
'b3ba605c072a12bae487cb2a1e19816c' => $vendorDir . '/magento/module-asynchronous-operations/registration.php', | |
- '7ca31a19ac3e7da1453ce1ab51a3dcf1' => $vendorDir . '/magento/module-page-cache/registration.php', | |
- 'd13cf42afd7e8468aaae642ce0a2c3cf' => $vendorDir . '/magento/module-security/registration.php', | |
'3f1662385885db186423ec0b74dfe6e9' => $vendorDir . '/magento/module-sales-rule/registration.php', | |
'e54a2a6d4f945c30feee43a0713bfb8b' => $vendorDir . '/magento/module-checkout/registration.php', | |
'108fd301b720a30c9ec42a785ee00656' => $vendorDir . '/magento/module-gift-message/registration.php', | |
@@ -55,18 +50,23 @@ | |
'ff4a42fb48f753f6d1e6177223059e3d' => $vendorDir . '/magento/module-msrp/registration.php', | |
'525ee31af56481824fb617fb584819fe' => $vendorDir . '/magento/module-catalog/registration.php', | |
'84c81d78e866655512cb7e51abfb2dc2' => $vendorDir . '/magento/module-media-storage/registration.php', | |
+ '41e3c70b13a38be15b2f71a5ab57282e' => $vendorDir . '/magento/module-cron/registration.php', | |
+ '8751700fbc137cc374c0c964e6f7a3d1' => $vendorDir . '/magento/module-config/registration.php', | |
'd297a3999f459b564a6bdc8eac3e49e4' => $vendorDir . '/magento/module-eav/registration.php', | |
- '5e0667def8057f122d18fe9bd1e06cbb' => $vendorDir . '/magento/module-email/registration.php', | |
- 'b933412926ebf8771a098bdecf1017b7' => $vendorDir . '/magento/module-cms/registration.php', | |
- '488f7c33a6ecd00a43d62e548d61b8d3' => $vendorDir . '/magento/module-newsletter/registration.php', | |
+ 'f894a74ac14b8468d8e4ce96b23e46c2' => $vendorDir . '/magento/module-directory/registration.php', | |
+ '7ca31a19ac3e7da1453ce1ab51a3dcf1' => $vendorDir . '/magento/module-page-cache/registration.php', | |
'489864ea263482896f9bb483ed58a3cc' => $vendorDir . '/magento/module-customer/registration.php', | |
'1c85558a9ac7e5b9c7b64b1fb5a75c57' => $vendorDir . '/magento/module-inventory-api/registration.php', | |
'2a9470a0cf5a054bc4c675d927f6376b' => $vendorDir . '/magento/module-catalog-inventory/registration.php', | |
+ '5e0667def8057f122d18fe9bd1e06cbb' => $vendorDir . '/magento/module-email/registration.php', | |
+ 'b933412926ebf8771a098bdecf1017b7' => $vendorDir . '/magento/module-cms/registration.php', | |
'3b2a3f374d04f3d43f268b999d9666c1' => $vendorDir . '/magento/module-inventory-sales-api/registration.php', | |
'7cd1eea45c3015924e265d9e36a4ab6e' => $vendorDir . '/magento/module-inventory-configuration-api/registration.php', | |
'1cd77d650669f8ff2a3638d87d11845f' => $vendorDir . '/magento/module-inventory-catalog-api/registration.php', | |
+ 'd13cf42afd7e8468aaae642ce0a2c3cf' => $vendorDir . '/magento/module-security/registration.php', | |
'dfd9907262eacfe8b22fef82dc6725c9' => $vendorDir . '/magento/module-integration/registration.php', | |
'80e236ed87b11d148e08e490eff863fd' => $vendorDir . '/magento/module-inventory/registration.php', | |
+ '488f7c33a6ecd00a43d62e548d61b8d3' => $vendorDir . '/magento/module-newsletter/registration.php', | |
'beef4a50b960435d4b145e8d222f5f10' => $vendorDir . '/magento/module-configurable-product/registration.php', | |
'b0531590328134738333bdd60add673f' => $vendorDir . '/magento/module-re-captcha-validation-api/registration.php', | |
'cbc7f0674bf1ae1a1c481a581c6ca4fd' => $vendorDir . '/magento/module-review/registration.php', | |
@@ -111,7 +111,10 @@ | |
'19b03cc33c349b5e5fbc6577c2f9dc87' => $vendorDir . '/magento/module-catalog-url-rewrite/registration.php', | |
'2ea2620d63b7a15b31d0f4deeb17bd92' => $vendorDir . '/magento/module-adobe-stock-client-api/registration.php', | |
'9d7db7a42183debc9bb6e9739868417f' => $vendorDir . '/magento/module-catalog-graph-ql/registration.php', | |
+ 'de1a3b54687292d8e2d1a62f46195bf7' => $vendorDir . '/magento/module-deploy/cli_commands.php', | |
+ '6ee1cd128090ab96a8b44cf40b66dcb4' => $vendorDir . '/magento/module-deploy/registration.php', | |
'1873ae6446634b40bf25026005067303' => $vendorDir . '/magento/module-re-captcha-frontend-ui/registration.php', | |
+ '556c7aed2035e389bcc1ad2f68ae4a63' => $vendorDir . '/magento/module-csp/registration.php', | |
'b0a44809b5ec8c6edb0d5f52ef3a56a2' => $vendorDir . '/magento/module-inventory-configuration/registration.php', | |
'9944ade184ae5fe1e30491426d3a4f16' => $vendorDir . '/magento/module-inventory-distance-based-source-selection-api/registration.php', | |
'b6b883acf444fbba1f9372b784c8be17' => $vendorDir . '/magento/module-inventory-in-store-pickup-sales-api/registration.php', | |
@@ -276,8 +279,6 @@ | |
'd480b9e729304b855a88fbd77665435f' => $vendorDir . '/magento/module-cms-page-builder-analytics/registration.php', | |
'212190e3b4423a19a199def12317e1fc' => $vendorDir . '/magento/module-cms-url-rewrite/registration.php', | |
'4e49f9b77cfaca5ecee9e68485c07e5a' => $vendorDir . '/magento/module-contact/registration.php', | |
- 'de1a3b54687292d8e2d1a62f46195bf7' => $vendorDir . '/magento/module-deploy/cli_commands.php', | |
- '6ee1cd128090ab96a8b44cf40b66dcb4' => $vendorDir . '/magento/module-deploy/registration.php', | |
'25584670065e55593675721143010b30' => $vendorDir . '/magento/module-inventory-advanced-checkout/registration.php', | |
'da6599fd030eb4184e3bc8521fa5516b' => $vendorDir . '/magento/module-inventory-bundle-import-export/registration.php', | |
'7ac51eab41fa7d03901d7b56cf518f0d' => $vendorDir . '/magento/module-inventory-bundle-product/registration.php', | |
@@ -394,7 +395,6 @@ | |
'fa488247ab9e0887c6f8ecae02575598' => $vendorDir . '/magento/module-configurable-import-export/registration.php', | |
'2547a59bc759d916e962aada373a6636' => $vendorDir . '/magento/module-configurable-product-graph-ql/registration.php', | |
'10f4736294c73baae681bdeaa5b8f0cb' => $vendorDir . '/magento/module-configurable-product-sales/registration.php', | |
- '556c7aed2035e389bcc1ad2f68ae4a63' => $vendorDir . '/magento/module-csp/registration.php', | |
'829ba7fc4432a3474ce52dbd8ed65ea7' => $vendorDir . '/magento/module-currency-symbol/registration.php', | |
'711c480702db30ae0b71924cfff2d411' => $vendorDir . '/magento/module-customer-analytics/registration.php', | |
'fa35fce979c4b45d59534c6b7987f8b8' => $vendorDir . '/magento/module-customer-downloadable-graph-ql/registration.php', | |
--- ../244p8/./vendor/composer/autoload_static.php 2024-06-11 10:35:20.818889926 +0200 | |
+++ ./vendor/composer/autoload_static.php 2024-06-11 10:35:28.827886886 +0200 | |
@@ -4,7 +4,7 @@ | |
namespace Composer\Autoload; | |
-class ComposerStaticInit093f64846a4dd9805b4571d3814985fc | |
+class ComposerStaticInit5955100c9022b4cf29918df314c113d8 | |
{ | |
public static $files = array ( | |
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', | |
@@ -25,7 +25,6 @@ | |
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', | |
'07ec02c7e667fdcb3e30c02cc772b743' => __DIR__ . '/..' . '/magento/framework/registration.php', | |
'fbcc86ec9185efc54c1e806bbb33c954' => __DIR__ . '/..' . '/magento/module-store/registration.php', | |
- '07f4b29581a907da6d366307f545041b' => __DIR__ . '/..' . '/magento/module-user/registration.php', | |
'3d9d6f82d2fa20ee6036e230ae5c2fff' => __DIR__ . '/..' . '/magento/module-ui/registration.php', | |
'47402ddfee46771bcf36e616cf38b137' => __DIR__ . '/..' . '/magento/module-variable/registration.php', | |
'abdeab164c8404da5b237afbed559c74' => __DIR__ . '/..' . '/magento/module-widget/registration.php', | |
@@ -34,20 +33,16 @@ | |
'6c89c3a060d2d522c8a81f44a7918e32' => __DIR__ . '/..' . '/magento/module-sales-sequence/registration.php', | |
'571be93292212396d8ebf8febc7bed8f' => __DIR__ . '/..' . '/magento/module-wishlist/registration.php', | |
'a402dea5ff0872fb10e6b9910d2dd108' => __DIR__ . '/..' . '/magento/module-sales/registration.php', | |
- '53814a716d73013b1489c928a2cb4164' => __DIR__ . '/..' . '/magento/module-shipping/registration.php', | |
- 'b6b63f684deb9dbde7a9fc9f251c982b' => __DIR__ . '/..' . '/magento/module-tax/registration.php', | |
- 'fdc62965dd362c599fddb5bfff3d1e54' => __DIR__ . '/..' . '/magento/module-quote/registration.php', | |
'81a6edf4c0f44fc1194f4d0362aa4102' => __DIR__ . '/..' . '/magento/module-backend/registration.php', | |
'f1296a4c3cc1525765fa1e180a2a4ca8' => __DIR__ . '/..' . '/magento/module-backend/cli_commands.php', | |
- '41e3c70b13a38be15b2f71a5ab57282e' => __DIR__ . '/..' . '/magento/module-cron/registration.php', | |
- '8751700fbc137cc374c0c964e6f7a3d1' => __DIR__ . '/..' . '/magento/module-config/registration.php', | |
'18a9d3b717442a10d28b3171b35bea25' => __DIR__ . '/..' . '/magento/module-authorization/registration.php', | |
+ '07f4b29581a907da6d366307f545041b' => __DIR__ . '/..' . '/magento/module-user/registration.php', | |
+ '53814a716d73013b1489c928a2cb4164' => __DIR__ . '/..' . '/magento/module-shipping/registration.php', | |
+ 'b6b63f684deb9dbde7a9fc9f251c982b' => __DIR__ . '/..' . '/magento/module-tax/registration.php', | |
+ 'fdc62965dd362c599fddb5bfff3d1e54' => __DIR__ . '/..' . '/magento/module-quote/registration.php', | |
'39607b7536d6ce26556aaeb1275f82dd' => __DIR__ . '/..' . '/magento/framework-bulk/registration.php', | |
- 'f894a74ac14b8468d8e4ce96b23e46c2' => __DIR__ . '/..' . '/magento/module-directory/registration.php', | |
'c15dd04b8a7893b89b5f554d9cb0778e' => __DIR__ . '/..' . '/magento/framework-message-queue/registration.php', | |
'b3ba605c072a12bae487cb2a1e19816c' => __DIR__ . '/..' . '/magento/module-asynchronous-operations/registration.php', | |
- '7ca31a19ac3e7da1453ce1ab51a3dcf1' => __DIR__ . '/..' . '/magento/module-page-cache/registration.php', | |
- 'd13cf42afd7e8468aaae642ce0a2c3cf' => __DIR__ . '/..' . '/magento/module-security/registration.php', | |
'3f1662385885db186423ec0b74dfe6e9' => __DIR__ . '/..' . '/magento/module-sales-rule/registration.php', | |
'e54a2a6d4f945c30feee43a0713bfb8b' => __DIR__ . '/..' . '/magento/module-checkout/registration.php', | |
'108fd301b720a30c9ec42a785ee00656' => __DIR__ . '/..' . '/magento/module-gift-message/registration.php', | |
@@ -56,18 +51,23 @@ | |
'ff4a42fb48f753f6d1e6177223059e3d' => __DIR__ . '/..' . '/magento/module-msrp/registration.php', | |
'525ee31af56481824fb617fb584819fe' => __DIR__ . '/..' . '/magento/module-catalog/registration.php', | |
'84c81d78e866655512cb7e51abfb2dc2' => __DIR__ . '/..' . '/magento/module-media-storage/registration.php', | |
+ '41e3c70b13a38be15b2f71a5ab57282e' => __DIR__ . '/..' . '/magento/module-cron/registration.php', | |
+ '8751700fbc137cc374c0c964e6f7a3d1' => __DIR__ . '/..' . '/magento/module-config/registration.php', | |
'd297a3999f459b564a6bdc8eac3e49e4' => __DIR__ . '/..' . '/magento/module-eav/registration.php', | |
- '5e0667def8057f122d18fe9bd1e06cbb' => __DIR__ . '/..' . '/magento/module-email/registration.php', | |
- 'b933412926ebf8771a098bdecf1017b7' => __DIR__ . '/..' . '/magento/module-cms/registration.php', | |
- '488f7c33a6ecd00a43d62e548d61b8d3' => __DIR__ . '/..' . '/magento/module-newsletter/registration.php', | |
+ 'f894a74ac14b8468d8e4ce96b23e46c2' => __DIR__ . '/..' . '/magento/module-directory/registration.php', | |
+ '7ca31a19ac3e7da1453ce1ab51a3dcf1' => __DIR__ . '/..' . '/magento/module-page-cache/registration.php', | |
'489864ea263482896f9bb483ed58a3cc' => __DIR__ . '/..' . '/magento/module-customer/registration.php', | |
'1c85558a9ac7e5b9c7b64b1fb5a75c57' => __DIR__ . '/..' . '/magento/module-inventory-api/registration.php', | |
'2a9470a0cf5a054bc4c675d927f6376b' => __DIR__ . '/..' . '/magento/module-catalog-inventory/registration.php', | |
+ '5e0667def8057f122d18fe9bd1e06cbb' => __DIR__ . '/..' . '/magento/module-email/registration.php', | |
+ 'b933412926ebf8771a098bdecf1017b7' => __DIR__ . '/..' . '/magento/module-cms/registration.php', | |
'3b2a3f374d04f3d43f268b999d9666c1' => __DIR__ . '/..' . '/magento/module-inventory-sales-api/registration.php', | |
'7cd1eea45c3015924e265d9e36a4ab6e' => __DIR__ . '/..' . '/magento/module-inventory-configuration-api/registration.php', | |
'1cd77d650669f8ff2a3638d87d11845f' => __DIR__ . '/..' . '/magento/module-inventory-catalog-api/registration.php', | |
+ 'd13cf42afd7e8468aaae642ce0a2c3cf' => __DIR__ . '/..' . '/magento/module-security/registration.php', | |
'dfd9907262eacfe8b22fef82dc6725c9' => __DIR__ . '/..' . '/magento/module-integration/registration.php', | |
'80e236ed87b11d148e08e490eff863fd' => __DIR__ . '/..' . '/magento/module-inventory/registration.php', | |
+ '488f7c33a6ecd00a43d62e548d61b8d3' => __DIR__ . '/..' . '/magento/module-newsletter/registration.php', | |
'beef4a50b960435d4b145e8d222f5f10' => __DIR__ . '/..' . '/magento/module-configurable-product/registration.php', | |
'b0531590328134738333bdd60add673f' => __DIR__ . '/..' . '/magento/module-re-captcha-validation-api/registration.php', | |
'cbc7f0674bf1ae1a1c481a581c6ca4fd' => __DIR__ . '/..' . '/magento/module-review/registration.php', | |
@@ -112,7 +112,10 @@ | |
'19b03cc33c349b5e5fbc6577c2f9dc87' => __DIR__ . '/..' . '/magento/module-catalog-url-rewrite/registration.php', | |
'2ea2620d63b7a15b31d0f4deeb17bd92' => __DIR__ . '/..' . '/magento/module-adobe-stock-client-api/registration.php', | |
'9d7db7a42183debc9bb6e9739868417f' => __DIR__ . '/..' . '/magento/module-catalog-graph-ql/registration.php', | |
+ 'de1a3b54687292d8e2d1a62f46195bf7' => __DIR__ . '/..' . '/magento/module-deploy/cli_commands.php', | |
+ '6ee1cd128090ab96a8b44cf40b66dcb4' => __DIR__ . '/..' . '/magento/module-deploy/registration.php', | |
'1873ae6446634b40bf25026005067303' => __DIR__ . '/..' . '/magento/module-re-captcha-frontend-ui/registration.php', | |
+ '556c7aed2035e389bcc1ad2f68ae4a63' => __DIR__ . '/..' . '/magento/module-csp/registration.php', | |
'b0a44809b5ec8c6edb0d5f52ef3a56a2' => __DIR__ . '/..' . '/magento/module-inventory-configuration/registration.php', | |
'9944ade184ae5fe1e30491426d3a4f16' => __DIR__ . '/..' . '/magento/module-inventory-distance-based-source-selection-api/registration.php', | |
'b6b883acf444fbba1f9372b784c8be17' => __DIR__ . '/..' . '/magento/module-inventory-in-store-pickup-sales-api/registration.php', | |
@@ -277,8 +280,6 @@ | |
'd480b9e729304b855a88fbd77665435f' => __DIR__ . '/..' . '/magento/module-cms-page-builder-analytics/registration.php', | |
'212190e3b4423a19a199def12317e1fc' => __DIR__ . '/..' . '/magento/module-cms-url-rewrite/registration.php', | |
'4e49f9b77cfaca5ecee9e68485c07e5a' => __DIR__ . '/..' . '/magento/module-contact/registration.php', | |
- 'de1a3b54687292d8e2d1a62f46195bf7' => __DIR__ . '/..' . '/magento/module-deploy/cli_commands.php', | |
- '6ee1cd128090ab96a8b44cf40b66dcb4' => __DIR__ . '/..' . '/magento/module-deploy/registration.php', | |
'25584670065e55593675721143010b30' => __DIR__ . '/..' . '/magento/module-inventory-advanced-checkout/registration.php', | |
'da6599fd030eb4184e3bc8521fa5516b' => __DIR__ . '/..' . '/magento/module-inventory-bundle-import-export/registration.php', | |
'7ac51eab41fa7d03901d7b56cf518f0d' => __DIR__ . '/..' . '/magento/module-inventory-bundle-product/registration.php', | |
@@ -395,7 +396,6 @@ | |
'fa488247ab9e0887c6f8ecae02575598' => __DIR__ . '/..' . '/magento/module-configurable-import-export/registration.php', | |
'2547a59bc759d916e962aada373a6636' => __DIR__ . '/..' . '/magento/module-configurable-product-graph-ql/registration.php', | |
'10f4736294c73baae681bdeaa5b8f0cb' => __DIR__ . '/..' . '/magento/module-configurable-product-sales/registration.php', | |
- '556c7aed2035e389bcc1ad2f68ae4a63' => __DIR__ . '/..' . '/magento/module-csp/registration.php', | |
'829ba7fc4432a3474ce52dbd8ed65ea7' => __DIR__ . '/..' . '/magento/module-currency-symbol/registration.php', | |
'711c480702db30ae0b71924cfff2d411' => __DIR__ . '/..' . '/magento/module-customer-analytics/registration.php', | |
'fa35fce979c4b45d59534c6b7987f8b8' => __DIR__ . '/..' . '/magento/module-customer-downloadable-graph-ql/registration.php', | |
@@ -1203,7 +1203,7 @@ | |
), | |
'Psr\\Log\\' => | |
array ( | |
- 0 => __DIR__ . '/..' . '/psr/log/src', | |
+ 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', | |
), | |
'Psr\\Http\\Message\\' => | |
array ( | |
@@ -3877,11 +3877,11 @@ | |
public static function getInitializer(ClassLoader $loader) | |
{ | |
return \Closure::bind(function () use ($loader) { | |
- $loader->prefixLengthsPsr4 = ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$prefixLengthsPsr4; | |
- $loader->prefixDirsPsr4 = ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$prefixDirsPsr4; | |
- $loader->prefixesPsr0 = ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$prefixesPsr0; | |
- $loader->fallbackDirsPsr0 = ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$fallbackDirsPsr0; | |
- $loader->classMap = ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$classMap; | |
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5955100c9022b4cf29918df314c113d8::$prefixLengthsPsr4; | |
+ $loader->prefixDirsPsr4 = ComposerStaticInit5955100c9022b4cf29918df314c113d8::$prefixDirsPsr4; | |
+ $loader->prefixesPsr0 = ComposerStaticInit5955100c9022b4cf29918df314c113d8::$prefixesPsr0; | |
+ $loader->fallbackDirsPsr0 = ComposerStaticInit5955100c9022b4cf29918df314c113d8::$fallbackDirsPsr0; | |
+ $loader->classMap = ComposerStaticInit5955100c9022b4cf29918df314c113d8::$classMap; | |
}, null, ClassLoader::class); | |
} | |
--- ../244p8/./vendor/composer/autoload_real.php 2024-06-11 10:35:20.818889926 +0200 | |
+++ ./vendor/composer/autoload_real.php 2024-06-11 10:35:28.827886886 +0200 | |
@@ -2,7 +2,7 @@ | |
// autoload_real.php @generated by Composer | |
-class ComposerAutoloaderInit093f64846a4dd9805b4571d3814985fc | |
+class ComposerAutoloaderInit5955100c9022b4cf29918df314c113d8 | |
{ | |
private static $loader; | |
@@ -22,20 +22,20 @@ | |
return self::$loader; | |
} | |
- spl_autoload_register(array('ComposerAutoloaderInit093f64846a4dd9805b4571d3814985fc', 'loadClassLoader'), true, true); | |
+ spl_autoload_register(array('ComposerAutoloaderInit5955100c9022b4cf29918df314c113d8', 'loadClassLoader'), true, true); | |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); | |
- spl_autoload_unregister(array('ComposerAutoloaderInit093f64846a4dd9805b4571d3814985fc', 'loadClassLoader')); | |
+ spl_autoload_unregister(array('ComposerAutoloaderInit5955100c9022b4cf29918df314c113d8', 'loadClassLoader')); | |
$includePaths = require __DIR__ . '/include_paths.php'; | |
$includePaths[] = get_include_path(); | |
set_include_path(implode(PATH_SEPARATOR, $includePaths)); | |
require __DIR__ . '/autoload_static.php'; | |
- call_user_func(\Composer\Autoload\ComposerStaticInit093f64846a4dd9805b4571d3814985fc::getInitializer($loader)); | |
+ call_user_func(\Composer\Autoload\ComposerStaticInit5955100c9022b4cf29918df314c113d8::getInitializer($loader)); | |
$loader->register(true); | |
- $filesToLoad = \Composer\Autoload\ComposerStaticInit093f64846a4dd9805b4571d3814985fc::$files; | |
+ $filesToLoad = \Composer\Autoload\ComposerStaticInit5955100c9022b4cf29918df314c113d8::$files; | |
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { | |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { | |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/GeneratorTrait.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/GeneratorTrait.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -7,9 +7,7 @@ | |
use Laminas\Di\Exception\GenerateCodeException; | |
use Laminas\Di\Exception\LogicException; | |
-use function assert; | |
use function is_dir; | |
-use function is_string; | |
use function mkdir; | |
use function sprintf; | |
@@ -21,7 +19,7 @@ | |
/** @var int */ | |
protected $mode = 0755; | |
- /** @var string|null */ | |
+ /** @var string */ | |
protected $outputDirectory; | |
/** | |
@@ -30,16 +28,13 @@ | |
* This will check the path at $dir if it exsits and if it is a directory | |
* | |
* @throws GenerateCodeException | |
- * @return void | |
*/ | |
protected function ensureDirectory(string $dir) | |
{ | |
- assert(is_string($this->outputDirectory)); | |
- | |
if (! is_dir($dir) && ! mkdir($dir, $this->mode, true)) { | |
throw new GenerateCodeException(sprintf( | |
'Could not create output directory: %s', | |
- $dir | |
+ $this->outputDirectory | |
)); | |
} | |
} | |
@@ -49,8 +44,6 @@ | |
* | |
* @throws LogicException | |
* @throws GenerateCodeException | |
- * @return void | |
- * @psalm-assert non-empty-string $this->outputDirectory | |
*/ | |
protected function ensureOutputDirectory() | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/AutoloadGenerator.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/AutoloadGenerator.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -26,8 +26,12 @@ | |
private const CLASS_TEMPLATE = __DIR__ . '/../../templates/autoloader-class.template'; | |
private const FILE_TEMPLATE = __DIR__ . '/../../templates/autoloader-file.template'; | |
- public function __construct(private string $namespace) | |
+ /** @var string */ | |
+ private $namespace; | |
+ | |
+ public function __construct(string $namespace) | |
{ | |
+ $this->namespace = $namespace; | |
} | |
private function writeFile(string $filename, string $code): void | |
@@ -45,7 +49,6 @@ | |
$template = file_get_contents($templateFile); | |
assert(is_string($template)); | |
- assert(is_string($this->outputDirectory)); | |
$this->writeFile( | |
sprintf('%s/%s', $this->outputDirectory, $outputFile), | |
@@ -56,17 +59,16 @@ | |
); | |
} | |
- /** | |
- * @param array<string, string> $classmap | |
- */ | |
private function generateClassmapCode(array &$classmap): string | |
{ | |
$lines = array_map( | |
- static fn(string $class, string $file): string => sprintf( | |
+ function (string $class, string $file): string { | |
+ return sprintf( | |
'%s => %s,', | |
var_export($class, true), | |
var_export($file, true) | |
- ), | |
+ ); | |
+ }, | |
array_keys($classmap), | |
$classmap | |
); | |
@@ -75,9 +77,6 @@ | |
return implode($indentation, $lines); | |
} | |
- /** | |
- * @param array<string, string> $classmap | |
- */ | |
private function generateAutoloaderClass(array &$classmap): void | |
{ | |
$this->buildFromTemplate(self::CLASS_TEMPLATE, 'Autoloader.php', [ | |
@@ -94,7 +93,7 @@ | |
} | |
/** | |
- * @param array<string, string> $classmap | |
+ * @param string[] $classmap | |
*/ | |
public function generate(array &$classmap): void | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/InjectorGenerator.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/InjectorGenerator.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -4,8 +4,6 @@ | |
namespace Laminas\Di\CodeGenerator; | |
-use Laminas\Di\CodeGenerator\AutoloadGenerator; | |
-use Laminas\Di\CodeGenerator\FactoryGenerator; | |
use Laminas\Di\ConfigInterface; | |
use Laminas\Di\Definition\DefinitionInterface; | |
use Laminas\Di\Resolver\DependencyResolverInterface; | |
@@ -28,8 +26,8 @@ | |
/** | |
* Generator for the dependency injector | |
* | |
- * Generates an Injector class that will use a generated factory for a requested | |
- * type, if available. This factory will contain pre-resolved dependencies | |
+ * Generates a Injector class that will use a generated factory for a requested | |
+ * type, if available. This factory will contained pre-resolved dependencies | |
* from the provided configuration, definition and resolver instances. | |
*/ | |
class InjectorGenerator | |
@@ -40,20 +38,27 @@ | |
private const INJECTOR_TEMPLATE = __DIR__ . '/../../templates/injector.template'; | |
private const INDENTATION_SPACES = 4; | |
+ /** @var ConfigInterface */ | |
+ private $config; | |
+ | |
/** | |
* @deprecated | |
* | |
- * @var DefinitionInterface|null | |
+ * @var DefinitionInterface | |
*/ | |
protected $definition; | |
- private string $namespace; | |
+ /** @var string */ | |
+ private $namespace; | |
- private FactoryGenerator $factoryGenerator; | |
+ /** @var FactoryGenerator */ | |
+ private $factoryGenerator; | |
- private AutoloadGenerator $autoloadGenerator; | |
+ /** @var AutoloadGenerator */ | |
+ private $autoloadGenerator; | |
- private LoggerInterface $logger; | |
+ /** @var LoggerInterface */ | |
+ private $logger; | |
/** | |
* Constructs the compiler instance | |
@@ -66,11 +71,12 @@ | |
* and processed classes. | |
*/ | |
public function __construct( | |
- private ConfigInterface $config, | |
+ ConfigInterface $config, | |
DependencyResolverInterface $resolver, | |
?string $namespace = null, | |
?LoggerInterface $logger = null | |
) { | |
+ $this->config = $config; | |
$this->namespace = $namespace ? : 'Laminas\Di\Generated'; | |
$this->factoryGenerator = new FactoryGenerator($config, $resolver, $this->namespace . '\Factory'); | |
$this->autoloadGenerator = new AutoloadGenerator($this->namespace); | |
@@ -92,8 +98,6 @@ | |
private function generateInjector(): void | |
{ | |
- assert(is_string($this->outputDirectory)); | |
- | |
$this->buildFromTemplate( | |
self::INJECTOR_TEMPLATE, | |
sprintf('%s/GeneratedInjector.php', $this->outputDirectory), | |
@@ -103,29 +107,22 @@ | |
); | |
} | |
- /** | |
- * @param array<string, string> $factories | |
- */ | |
private function generateFactoryList(array $factories): void | |
{ | |
$indentation = sprintf("\n%s", str_repeat(' ', self::INDENTATION_SPACES)); | |
$codeLines = array_map( | |
- static fn(string $key, string $value): string => | |
- sprintf('%s => %s,', var_export($key, true), var_export($value, true)), | |
+ function (string $key, string $value): string { | |
+ return sprintf('%s => %s,', var_export($key, true), var_export($value, true)); | |
+ }, | |
array_keys($factories), | |
$factories | |
); | |
- assert(is_string($this->outputDirectory)); | |
- | |
$this->buildFromTemplate(self::FACTORY_LIST_TEMPLATE, sprintf('%s/factories.php', $this->outputDirectory), [ | |
'%factories%' => implode($indentation, $codeLines), | |
]); | |
} | |
- /** | |
- * @param array<string, string> $factories | |
- */ | |
private function generateTypeFactory(string $class, array &$factories): void | |
{ | |
if (isset($factories[$class])) { | |
@@ -151,7 +148,9 @@ | |
private function generateAutoload(): void | |
{ | |
- $addFactoryPrefix = static fn(string $value): string => 'Factory/' . $value; | |
+ $addFactoryPrefix = function ($value) { | |
+ return 'Factory/' . $value; | |
+ }; | |
$classmap = array_map($addFactoryPrefix, $this->factoryGenerator->getClassmap()); | |
@@ -173,7 +172,7 @@ | |
* | |
* This will generate the injector and its factories into the output directory | |
* | |
- * @param class-string[] $classes | |
+ * @param string[] $classes | |
*/ | |
public function generate($classes = []): void | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/FactoryInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/FactoryInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -6,16 +6,12 @@ | |
use Psr\Container\ContainerInterface; | |
-/** | |
- * @template T extends object | |
- */ | |
interface FactoryInterface | |
{ | |
/** | |
* Create an instance | |
* | |
- * @param array<mixed> $options | |
- * @return T | |
+ * @return object | |
*/ | |
public function create(ContainerInterface $container, array $options); | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/AbstractInjector.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/AbstractInjector.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -13,16 +13,24 @@ | |
*/ | |
abstract class AbstractInjector implements InjectorInterface | |
{ | |
- /** @var array<string, class-string<FactoryInterface>|FactoryInterface> */ | |
+ /** @var string[]|FactoryInterface[] */ | |
protected $factories = []; | |
- /** @var array<string, FactoryInterface> */ | |
- private array $factoryInstances = []; | |
+ /** @var FactoryInterface[] */ | |
+ private $factoryInstances = []; | |
- private ContainerInterface $container; | |
+ /** @var ContainerInterface */ | |
+ private $container; | |
- public function __construct(private InjectorInterface $injector, ?ContainerInterface $container = null) | |
+ /** @var InjectorInterface */ | |
+ private $injector; | |
+ | |
+ /** | |
+ * {@inheritDoc} | |
+ */ | |
+ public function __construct(InjectorInterface $injector, ?ContainerInterface $container = null) | |
{ | |
+ $this->injector = $injector; | |
$this->container = $container ?: new DefaultContainer($this); | |
$this->loadFactoryList(); | |
@@ -38,11 +46,6 @@ | |
$this->factoryInstances[$type] = $factory; | |
} | |
- /** | |
- * @template T | |
- * @param string|class-string<T> $type | |
- * @return FactoryInterface<T> | |
- */ | |
private function getFactory(string $type): FactoryInterface | |
{ | |
if (isset($this->factoryInstances[$type])) { | |
@@ -59,23 +62,13 @@ | |
public function canCreate(string $name): bool | |
{ | |
- return $this->hasFactory($name) || $this->injector->canCreate($name); | |
+ return isset($this->factories[$name]) || $this->injector->canCreate($name); | |
} | |
- private function hasFactory(string $name): bool | |
- { | |
- return isset($this->factories[$name]); | |
- } | |
- | |
- /** | |
- * @template T of object | |
- * @param string|class-string<T> $name | |
- * @param array<mixed> $options | |
- * @return T | |
- */ | |
+ /** @return mixed */ | |
public function create(string $name, array $options = []) | |
{ | |
- if ($this->hasFactory($name)) { | |
+ if (isset($this->factories[$name])) { | |
return $this->getFactory($name)->create($this->container, $options); | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/CodeGenerator/FactoryGenerator.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/CodeGenerator/FactoryGenerator.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -46,16 +46,25 @@ | |
__CODE__; | |
- private string $namespace; | |
+ /** @var string */ | |
+ private $namespace; | |
- /** @var array<string, string> */ | |
- private array $classmap = []; | |
+ /** @var DependencyResolverInterface */ | |
+ private $resolver; | |
+ | |
+ /** @var ConfigInterface */ | |
+ private $config; | |
+ | |
+ /** @var array */ | |
+ private $classmap = []; | |
public function __construct( | |
- private ConfigInterface $config, | |
- private DependencyResolverInterface $resolver, | |
+ ConfigInterface $config, | |
+ DependencyResolverInterface $resolver, | |
?string $namespace = null | |
) { | |
+ $this->resolver = $resolver; | |
+ $this->config = $config; | |
$this->namespace = $namespace ?: 'LaminasDiGenerated'; | |
} | |
@@ -174,8 +183,6 @@ | |
$factoryClassName = $this->namespace . '\\' . $this->buildClassName($class); | |
[$namespace, $unqualifiedFactoryClassName] = $this->splitFullyQualifiedClassName($factoryClassName); | |
- assert(is_string($this->outputDirectory)); | |
- | |
$filename = $this->buildFileName($class); | |
$filepath = $this->outputDirectory . '/' . $filename; | |
$template = file_get_contents(self::TEMPLATE_FILE); | |
@@ -191,7 +198,6 @@ | |
'%options_to_args_code%' => $paramsCode, | |
'%use_array_key_exists%' => $paramsCode ? "\nuse function array_key_exists;" : '', | |
'%args%' => $paramsCode ? '...$args' : '', | |
- '%psalm_suppress%' => $paramsCode ? "\n /** @psalm-suppress MixedArgument */" : '', | |
] | |
); | |
@@ -204,9 +210,6 @@ | |
return $factoryClassName; | |
} | |
- /** | |
- * @return array<string, string> | |
- */ | |
public function getClassmap(): array | |
{ | |
return $this->classmap; | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/ValueInjection.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/ValueInjection.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -22,12 +22,19 @@ | |
*/ | |
class ValueInjection implements InjectionInterface | |
{ | |
- public function __construct( | |
/** | |
* Holds the value to inject | |
+ * | |
+ * @var mixed | |
+ */ | |
+ protected $value; | |
+ | |
+ /** | |
+ * @param mixed $value | |
*/ | |
- protected mixed $value | |
- ) { | |
+ public function __construct($value) | |
+ { | |
+ $this->value = $value; | |
} | |
public static function __set_state(array $state): self | |
@@ -64,15 +71,16 @@ | |
/** | |
* Check if the provided value is exportable. | |
* For arrays it uses recursion. | |
+ * | |
+ * @param mixed $value | |
*/ | |
- private function isExportableRecursive(mixed $value): bool | |
+ private function isExportableRecursive($value): bool | |
{ | |
if (is_scalar($value) || $value === null) { | |
return true; | |
} | |
if (is_array($value)) { | |
- /** @var mixed $item */ | |
foreach ($value as $item) { | |
if (! $this->isExportableRecursive($item)) { | |
return false; | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/InjectionInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/InjectionInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -11,9 +11,9 @@ | |
* Encapsulates the injection to perform for a parameter | |
* | |
* Implementations of this class will handle how the resolved dependency is provided and how (if possible) it can | |
- * be generated to PHP code for AoT compilation. | |
+ * be generated to php code for AoT compilation. | |
* | |
- * For example the `TypeInjection`, that implements this interface, handles when the injection resolves to a specific | |
+ * For example the `TypeInjection`, that implements this interface, handles when the injections resolves to a specific | |
* type. It will provide the injection with help of the di container. `ValueInjection` on the other hand handles | |
* when a concrete value or instance should be injected. | |
* | |
@@ -26,7 +26,7 @@ | |
* @see DependencyResolverInterface::resolveParameters() The resolver method's return type | |
* @see \Laminas\Di\Injector::getInjectionValue() The default injector implementation | |
* @see TypeInjection Implementation for injecting an instance of a specific type | |
- * @see ValueInjection Implementation for injecting an existing value | |
+ * @see ValueInjection Implementation for injection an existing value | |
*/ | |
interface InjectionInterface | |
{ | |
@@ -53,7 +53,7 @@ | |
* | |
* Implementations may use this method to indicate if they may be exported to PHP code. This may not be possible | |
* in some situations, for example when the injection is a `resource` that cannot be provided with a piece | |
- * of PHP code. | |
+ * of php code. | |
* | |
* When this method returns false, a call to `export()` should throw a | |
* `Laminas\Di\Exception\LogicException` | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/DependencyResolver.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/DependencyResolver.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -10,16 +10,16 @@ | |
use Laminas\Di\Exception; | |
use Psr\Container\ContainerInterface; | |
use ReflectionClass; | |
+use Traversable; | |
use function array_filter; | |
use function array_merge; | |
-use function assert; | |
use function class_exists; | |
use function gettype; | |
use function in_array; | |
use function interface_exists; | |
+use function is_array; | |
use function is_callable; | |
-use function is_iterable; | |
use function is_numeric; | |
use function is_string; | |
use function sprintf; | |
@@ -35,11 +35,11 @@ | |
/** @var DefinitionInterface */ | |
protected $definition; | |
- /** @var ContainerInterface|null */ | |
+ /** @var ContainerInterface */ | |
protected $container; | |
/** @var string[] */ | |
- private array $builtinTypes = [ | |
+ private $builtinTypes = [ | |
'string', | |
'int', | |
'bool', | |
@@ -52,7 +52,7 @@ | |
]; | |
/** @var array<string, string> */ | |
- private array $gettypeMap = [ | |
+ private $gettypeMap = [ | |
'boolean' => 'bool', | |
'integer' => 'int', | |
'double' => 'float', | |
@@ -107,7 +107,9 @@ | |
// A type configuration may define a parameter should be auto resolved | |
// even it was defined earlier | |
- $params = array_filter($params, static fn($value): bool => $value !== '*'); | |
+ $params = array_filter($params, function ($value) { | |
+ return $value !== '*'; | |
+ }); | |
return $params; | |
} | |
@@ -148,7 +150,10 @@ | |
&& ($this->container === null || $this->container->has($type)); | |
} | |
- private function getTypeNameFromValue(mixed $value): string | |
+ /** | |
+ * @param mixed $value | |
+ */ | |
+ private function getTypeNameFromValue($value): string | |
{ | |
$type = gettype($value); | |
return $this->gettypeMap[$type] ?? $type; | |
@@ -160,7 +165,7 @@ | |
* @param mixed $value The value to check | |
* @param string $type The typename to check against | |
*/ | |
- private function isValueOf(mixed $value, string $type): bool | |
+ private function isValueOf($value, string $type): bool | |
{ | |
if (! $this->isBuiltinType($type)) { | |
return $value instanceof $type; | |
@@ -171,7 +176,7 @@ | |
} | |
if ($type === 'iterable') { | |
- return is_iterable($value); | |
+ return is_array($value) || $value instanceof Traversable; | |
} | |
$valueType = $this->getTypeNameFromValue($value); | |
@@ -221,8 +226,10 @@ | |
* Prepare a candidate for injection | |
* | |
* If the candidate is usable, its injection representation is returned | |
+ * | |
+ * @param mixed $value | |
*/ | |
- private function prepareInjection(mixed $value, ?string $requiredType): ?InjectionInterface | |
+ private function prepareInjection($value, ?string $requiredType): ?InjectionInterface | |
{ | |
if ($value instanceof ValueInjection || $value instanceof TypeInjection) { | |
return $value; | |
@@ -287,7 +294,7 @@ | |
throw new Exception\UnexpectedValueException(sprintf( | |
'Unusable configured injection for parameter "%s" of type "%s"', | |
$name, | |
- $type ?? 'null' | |
+ $type | |
)); | |
} | |
@@ -317,9 +324,6 @@ | |
if ($paramInfo->isRequired()) { | |
$isAlias = $this->config->isAlias($requestedType); | |
$class = $isAlias ? $this->config->getClassForAlias($requestedType) : $requestedType; | |
- | |
- assert(is_string($class)); | |
- | |
throw new Exception\MissingPropertyException(sprintf( | |
'Could not resolve value for parameter "%s" of type %s in class %s (requested as %s)', | |
$name, | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/DependencyResolverInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/DependencyResolverInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -39,11 +39,11 @@ | |
/** | |
* Resolves all parameters for injection | |
* | |
- * @param string $requestedType The class name to resolve the parameters for | |
- * @param array<mixed> $callTimeParameters Parameters to use as provided. | |
+ * @param string $class The class name to resolve the parameters for | |
+ * @param array $parameters Parameters to use as provided. | |
* @return InjectionInterface[] Returns the injection parameters as indexed array. This | |
* array contains either TypeInjection or ValueInjection instances | |
* @throws MissingPropertyException When a parameter could not be resolved. | |
*/ | |
- public function resolveParameters(string $requestedType, array $callTimeParameters = []): array; | |
+ public function resolveParameters(string $class, array $parameters = []): array; | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/AbstractInjection.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/AbstractInjection.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -27,7 +27,8 @@ | |
*/ | |
abstract class AbstractInjection | |
{ | |
- private string $parameterName; | |
+ /** @var string */ | |
+ private $parameterName; | |
public function setParameterName(string $name): self | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/Resolver/TypeInjection.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Resolver/TypeInjection.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -5,7 +5,6 @@ | |
namespace Laminas\Di\Resolver; | |
use Psr\Container\ContainerInterface; | |
-use Stringable; | |
use function trigger_error; | |
use function var_export; | |
@@ -15,17 +14,21 @@ | |
/** | |
* Wrapper for types that should be looked up for injection | |
*/ | |
-final class TypeInjection implements InjectionInterface, Stringable | |
+final class TypeInjection implements InjectionInterface | |
{ | |
/** | |
- * Constructor | |
+ * Holds the type name to look up | |
+ * | |
+ * @var string | |
*/ | |
- public function __construct( | |
+ private $type; | |
+ | |
/** | |
- * Holds the type name to look up | |
+ * Constructor | |
*/ | |
- private string $type | |
- ) { | |
+ public function __construct(string $type) | |
+ { | |
+ $this->type = $type; | |
} | |
public function export(): string | |
--- ../244p8/./vendor/laminas/laminas-di/src/Injector.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Injector.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -4,6 +4,7 @@ | |
namespace Laminas\Di; | |
+use Interop\Container\ContainerInterface as LegacyContainerInterface; | |
use Laminas\Di\Definition\DefinitionInterface; | |
use Laminas\Di\Exception\ClassNotFoundException; | |
use Laminas\Di\Exception\InvalidCallbackException; | |
@@ -18,6 +19,7 @@ | |
use function class_exists; | |
use function implode; | |
use function in_array; | |
+use function interface_exists; | |
use function sprintf; | |
/** | |
@@ -104,20 +106,19 @@ | |
public function canCreate(string $name): bool | |
{ | |
$class = $this->getClassName($name); | |
- return class_exists($class); | |
+ return class_exists($class) && ! interface_exists($class); | |
} | |
/** | |
* Create the instance with auto wiring | |
* | |
- * @template T of object | |
- * @param string|class-string<T> $name Class name or service alias | |
- * @param array<mixed> $options Constructor parameters, keyed by the parameter name. | |
- * @return T | |
+ * @param string $name Class name or service alias | |
+ * @param array $parameters Constructor parameters, keyed by the parameter name. | |
+ * @return object|null | |
* @throws ClassNotFoundException | |
* @throws RuntimeException | |
*/ | |
- public function create(string $name, array $options = []) | |
+ public function create(string $name, array $parameters = []) | |
{ | |
if (in_array($name, $this->instantiationStack)) { | |
throw new Exception\CircularDependencyException(sprintf( | |
@@ -130,7 +131,7 @@ | |
$this->instantiationStack[] = $name; | |
try { | |
- $instance = $this->createInstance($name, $options); | |
+ $instance = $this->createInstance($name, $parameters); | |
} finally { | |
array_pop($this->instantiationStack); | |
} | |
@@ -143,10 +144,9 @@ | |
* | |
* Any parameters provided will be used as constructor arguments only. | |
* | |
- * @template T of object | |
- * @param string|class-string<T> $name The type name to instantiate. | |
- * @param array<mixed> $params Constructor arguments, keyed by the parameter name. | |
- * @return T | |
+ * @param string $name The type name to instantiate. | |
+ * @param array $params Constructor arguments, keyed by the parameter name. | |
+ * @return object | |
* @throws InvalidCallbackException | |
* @throws ClassNotFoundException | |
*/ | |
@@ -163,19 +163,15 @@ | |
)); | |
} | |
- if (! class_exists($class)) { | |
+ if (! class_exists($class) || interface_exists($class)) { | |
throw new ClassNotFoundException(sprintf( | |
- 'Class by name %s does not exist', | |
+ 'Class or interface by name %s does not exist', | |
$class | |
)); | |
} | |
$callParameters = $this->resolveParameters($name, $params); | |
- /** | |
- * @psalm-suppress MixedMethodCall | |
- * @psalm-var T | |
- */ | |
return new $class(...$callParameters); | |
} | |
@@ -187,8 +183,7 @@ | |
$container = $this->container; | |
$containerTypes = [ | |
ContainerInterface::class, | |
- // Be backwards compatible with interop/container: | |
- 'Interop\Container\ContainerInterface', // phpcs:ignore | |
+ LegacyContainerInterface::class, // Be backwards compatible with interop/container | |
]; | |
if ( | |
@@ -210,8 +205,8 @@ | |
* the ioc container to fetch the instances | |
* | |
* @param string $type The class or alias name to resolve for | |
- * @param array<string, mixed> $params Provided call time parameters | |
- * @return list<mixed> The resulting arguments in call order | |
+ * @param array $params Provided call time parameters | |
+ * @return array The resulting arguments in call order | |
* @throws Exception\UndefinedReferenceException When a type cannot be | |
* obtained via the ioc container and the method is required for | |
* injection. | |
@@ -220,20 +215,20 @@ | |
private function resolveParameters(string $type, array $params = []): array | |
{ | |
$resolved = $this->resolver->resolveParameters($type, $params); | |
- $foundParams = []; | |
+ $params = []; | |
- foreach ($resolved as $injection) { | |
+ foreach ($resolved as $position => $injection) { | |
try { | |
- $foundParams[] = $this->getInjectionValue($injection); | |
+ $params[] = $this->getInjectionValue($injection); | |
} catch (NotFoundExceptionInterface $containerException) { | |
throw new Exception\UndefinedReferenceException( | |
$containerException->getMessage(), | |
- (int) $containerException->getCode(), | |
+ $containerException->getCode(), | |
$containerException | |
); | |
} | |
} | |
- return $foundParams; | |
+ return $params; | |
} | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/DefaultContainer.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/DefaultContainer.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -6,6 +6,8 @@ | |
use Psr\Container\ContainerInterface; | |
+use function get_class; | |
+ | |
/** | |
* Default IoC container implementation. | |
* | |
@@ -23,7 +25,7 @@ | |
/** | |
* Registered services and cached values | |
* | |
- * @var array<string, object> | |
+ * @var array | |
*/ | |
protected $services = []; | |
@@ -33,7 +35,7 @@ | |
$this->services[InjectorInterface::class] = $injector; | |
$this->services[ContainerInterface::class] = $this; | |
- $this->services[$injector::class] = $injector; | |
+ $this->services[get_class($injector)] = $injector; | |
$this->services[static::class] = $this; | |
} | |
@@ -55,7 +57,7 @@ | |
* @see ContainerInterface::has() | |
* | |
* @param string $name | |
- * @return bool | |
+ * @return mixed | |
*/ | |
public function has($name) | |
{ | |
@@ -78,7 +80,7 @@ | |
* @see ContainerInterface::get() | |
* | |
* @param string $name | |
- * @return object | |
+ * @return mixed | |
*/ | |
public function get($name) | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/Container/InjectorFactory.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Container/InjectorFactory.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -8,6 +8,7 @@ | |
use Laminas\Di\Injector; | |
use Laminas\Di\InjectorInterface; | |
use Psr\Container\ContainerInterface; | |
+use Zend\Di\ConfigInterface as LegacyConfigInterace; | |
/** | |
* Implements the DependencyInjector service factory for laminas-servicemanager | |
@@ -20,9 +21,8 @@ | |
return $container->get(ConfigInterface::class); | |
} | |
- if ($container->has('Zend\Di\ConfigInterface')) { | |
- /** @psalm-var ConfigInterface */ | |
- return $container->get('Zend\Di\ConfigInterface'); | |
+ if ($container->has(LegacyConfigInterace::class)) { | |
+ return $container->get(LegacyConfigInterace::class); | |
} | |
return (new ConfigFactory())->create($container); | |
--- ../244p8/./vendor/laminas/laminas-di/src/Container/ConfigFactory.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Container/ConfigFactory.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -4,16 +4,12 @@ | |
namespace Laminas\Di\Container; | |
-use ArrayAccess; | |
use Laminas\Di\Config; | |
use Laminas\Di\ConfigInterface; | |
use Laminas\Di\LegacyConfig; | |
use Psr\Container\ContainerInterface; | |
use function array_merge_recursive; | |
-use function assert; | |
-use function is_array; | |
-use function is_iterable; | |
use function trigger_error; | |
use const E_USER_DEPRECATED; | |
@@ -24,32 +20,21 @@ | |
class ConfigFactory | |
{ | |
/** | |
- * @psalm-suppress MixedArrayAccess | |
* @return Config | |
*/ | |
public function create(ContainerInterface $container): ConfigInterface | |
{ | |
- /** @var mixed $config */ | |
$config = $container->has('config') ? $container->get('config') : []; | |
- | |
- /** @var mixed $data */ | |
$data = $config['dependencies']['auto'] ?? []; | |
- /** @var mixed $legacyData */ | |
- $legacyData = $config['di'] ?? null; | |
- | |
- assert(is_array($data)); | |
- | |
- if ($legacyData !== null) { | |
+ if (isset($config['di'])) { | |
trigger_error( | |
'Detected legacy DI configuration, please upgrade to v3. ' | |
. 'See https://docs.laminas.dev/laminas-di/migration/ for details.', | |
E_USER_DEPRECATED | |
); | |
- assert(is_iterable($legacyData) || $legacyData instanceof ArrayAccess); | |
- | |
- $legacyConfig = new LegacyConfig($legacyData); | |
+ $legacyConfig = new LegacyConfig($config['di']); | |
$data = array_merge_recursive($legacyConfig->toArray(), $data); | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/Container/ServiceManager/AutowireFactory.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Container/ServiceManager/AutowireFactory.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -4,9 +4,9 @@ | |
namespace Laminas\Di\Container\ServiceManager; | |
+use Interop\Container\ContainerInterface; | |
use Laminas\Di\Container\AutowireFactory as GenericAutowireFactory; | |
use Laminas\ServiceManager\Factory\AbstractFactoryInterface; | |
-use Psr\Container\ContainerInterface; | |
/** | |
* Create instances with autowiring | |
@@ -15,7 +15,8 @@ | |
*/ | |
class AutowireFactory implements AbstractFactoryInterface | |
{ | |
- private GenericAutowireFactory $factory; | |
+ /** @var GenericAutowireFactory */ | |
+ private $factory; | |
public function __construct(?GenericAutowireFactory $factory = null) | |
{ | |
@@ -36,9 +37,8 @@ | |
/** | |
* Make invokable and implement the laminas-service factory pattern | |
* | |
- * @psalm-suppress RedundantCastGivenDocblockType | |
* @param string $requestedName | |
- * @return object | |
+ * @return bool | |
*/ | |
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/Container/GeneratorFactory.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Container/GeneratorFactory.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -9,10 +9,7 @@ | |
use Laminas\Di\Definition\RuntimeDefinition; | |
use Laminas\Di\Resolver\DependencyResolver; | |
use Psr\Container\ContainerInterface; | |
-use Psr\Log\LoggerInterface; | |
- | |
-use function assert; | |
-use function is_string; | |
+use Zend\Di\ConfigInterface as LegacyConfigInterace; | |
class GeneratorFactory | |
{ | |
@@ -22,18 +19,13 @@ | |
return $container->get(ConfigInterface::class); | |
} | |
- if ($container->has('Zend\Di\ConfigInterface')) { | |
- /** @psalm-var ConfigInterface */ | |
- return $container->get('Zend\Di\ConfigInterface'); | |
+ if ($container->has(LegacyConfigInterace::class)) { | |
+ return $container->get(LegacyConfigInterace::class); | |
} | |
return (new ConfigFactory())->create($container); | |
} | |
- /** | |
- * @psalm-suppress MixedAssignment | |
- * @psalm-suppress MixedArrayAccess | |
- */ | |
public function create(ContainerInterface $container): InjectorGenerator | |
{ | |
$diConfig = $this->getConfig($container); | |
@@ -46,16 +38,13 @@ | |
$logger = null; | |
if (isset($aotConfig['logger'])) { | |
- $logger = $container->get((string) $aotConfig['logger']); | |
- assert($logger instanceof LoggerInterface); | |
+ $logger = $container->get($aotConfig['logger']); | |
} | |
- assert($namespace === null || is_string($namespace)); | |
- | |
$generator = new InjectorGenerator($diConfig, $resolver, $namespace, $logger); | |
if (isset($aotConfig['directory'])) { | |
- $generator->setOutputDirectory((string) $aotConfig['directory']); | |
+ $generator->setOutputDirectory($aotConfig['directory']); | |
} | |
return $generator; | |
--- ../244p8/./vendor/laminas/laminas-di/src/Container/AutowireFactory.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Container/AutowireFactory.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -17,9 +17,10 @@ | |
* Retrieves the injector from a container | |
* | |
* @param ContainerInterface $container The container context for this factory | |
+ * @return InjectorInterface The dependency injector | |
* @throws Exception\RuntimeException When no dependency injector is available. | |
*/ | |
- private function getInjector(ContainerInterface $container): InjectorInterface | |
+ private function getInjector(ContainerInterface $container) | |
{ | |
$injector = $container->get(InjectorInterface::class); | |
@@ -44,17 +45,13 @@ | |
return false; | |
} | |
- /** @psalm-suppress RedundantCastGivenDocblockType Avoid behavior BC break */ | |
return $this->getInjector($container)->canCreate((string) $requestedName); | |
} | |
/** | |
* Create an instance | |
* | |
- * @template T of object | |
- * @param string|class-string<T> $requestedName | |
- * @param array<mixed>|null $options | |
- * @return T | |
+ * @return object | |
*/ | |
public function create(ContainerInterface $container, string $requestedName, ?array $options = null) | |
{ | |
@@ -64,14 +61,11 @@ | |
/** | |
* Make invokable and implement the laminas-service factory pattern | |
* | |
- * @template T of object | |
- * @param string|class-string<T> $requestedName | |
- * @param array<mixed>|null $options | |
- * @return T | |
+ * @param string $requestedName | |
+ * @return object | |
*/ | |
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) | |
{ | |
- /** @psalm-suppress RedundantCastGivenDocblockType Avoid behavior BC break */ | |
return $this->create($container, (string) $requestedName, $options); | |
} | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/Definition/RuntimeDefinition.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Definition/RuntimeDefinition.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -16,19 +16,20 @@ | |
*/ | |
class RuntimeDefinition implements DefinitionInterface | |
{ | |
- /** @var array<class-string, ClassDefinition> */ | |
- private array $definition = []; | |
+ /** @var ClassDefinition[] */ | |
+ private $definition = []; | |
- /** @var array<class-string, bool> */ | |
- private array $explicitClasses; | |
+ /** @var bool[] */ | |
+ private $explicitClasses; | |
/** | |
- * @param null|class-string[] $explicitClasses | |
+ * @param null|string[] $explicitClasses | |
*/ | |
public function __construct(?array $explicitClasses = null) | |
{ | |
- $this->explicitClasses = []; | |
- $this->setExplicitClasses($explicitClasses ?? []); | |
+ if ($explicitClasses) { | |
+ $this->setExplicitClasses($explicitClasses); | |
+ } | |
} | |
/** | |
@@ -36,7 +37,7 @@ | |
* | |
* @see addExplicitClass() | |
* | |
- * @param class-string[] $explicitClasses An array of class names | |
+ * @param string[] $explicitClasses An array of class names | |
* @throws Exception\ClassNotFoundException | |
*/ | |
public function setExplicitClasses(array $explicitClasses): self | |
@@ -56,53 +57,56 @@ | |
* Adding classes this way will cause the defintion to report them when getClasses() | |
* is called, even when they're not yet loaded. | |
* | |
- * @param class-string $class | |
* @throws Exception\ClassNotFoundException | |
*/ | |
public function addExplicitClass(string $class): self | |
{ | |
- $this->ensureClassExists($class); | |
+ if (! class_exists($class)) { | |
+ throw new Exception\ClassNotFoundException($class); | |
+ } | |
+ | |
+ if (! $this->explicitClasses) { | |
+ $this->explicitClasses = []; | |
+ } | |
+ | |
$this->explicitClasses[$class] = true; | |
return $this; | |
} | |
/** | |
- * @psalm-assert class-string $class | |
+ * @param string $class The class name to load | |
* @throws Exception\ClassNotFoundException | |
*/ | |
- private function ensureClassExists(string $class): void | |
+ private function loadClass(string $class) | |
{ | |
if (! $this->hasClass($class)) { | |
throw new Exception\ClassNotFoundException($class); | |
} | |
+ | |
+ $this->definition[$class] = new ClassDefinition($class); | |
} | |
/** | |
- * @param class-string $class The class name to load | |
- * @throws Exception\ClassNotFoundException | |
+ * @return string[] | |
*/ | |
- private function loadClass(string $class): void | |
+ public function getClasses(): array | |
{ | |
- $this->ensureClassExists($class); | |
- | |
- $this->definition[$class] = new ClassDefinition($class); | |
+ if (! $this->explicitClasses) { | |
+ return array_keys($this->definition); | |
} | |
- /** @return list<class-string> */ | |
- public function getClasses(): array | |
- { | |
return array_keys(array_merge($this->definition, $this->explicitClasses)); | |
} | |
- /** | |
- * @psalm-assert-if-true class-string $class | |
- */ | |
public function hasClass(string $class): bool | |
{ | |
return class_exists($class); | |
} | |
- /** @throws Exception\ClassNotFoundException */ | |
+ /** | |
+ * @return ClassDefinition | |
+ * @throws Exception\ClassNotFoundException | |
+ */ | |
public function getClassDefinition(string $class): ClassDefinitionInterface | |
{ | |
if (! isset($this->definition[$class])) { | |
--- ../244p8/./vendor/laminas/laminas-di/src/Definition/Reflection/ClassDefinition.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Definition/Reflection/ClassDefinition.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -5,20 +5,25 @@ | |
namespace Laminas\Di\Definition\Reflection; | |
use Laminas\Di\Definition\ClassDefinitionInterface; | |
+use Laminas\Di\Definition\ParameterInterface; | |
use ReflectionClass; | |
+use ReflectionParameter; | |
+ | |
+use function uasort; | |
class ClassDefinition implements ClassDefinitionInterface | |
{ | |
- private ReflectionClass $reflection; | |
+ /** @var ReflectionClass */ | |
+ private $reflection; | |
- /** @var array<string, Parameter>|null */ | |
- private ?array $parameters = null; | |
+ /** @var Parameter[] */ | |
+ private $parameters; | |
- /** @var list<class-string>|null */ | |
- private ?array $supertypes = null; | |
+ /** @var string[] */ | |
+ private $supertypes; | |
/** | |
- * @param class-string|ReflectionClass $class | |
+ * @param string|ReflectionClass $class | |
*/ | |
public function __construct($class) | |
{ | |
@@ -29,10 +34,7 @@ | |
$this->reflection = $class; | |
} | |
- /** | |
- * @psalm-assert list<string> $this->supertypes | |
- */ | |
- private function reflectSupertypes(): void | |
+ private function reflectSupertypes() | |
{ | |
$this->supertypes = []; | |
$class = $this->reflection; | |
@@ -48,7 +50,7 @@ | |
} | |
/** | |
- * @return list<class-string> | |
+ * @return string[] | |
*/ | |
public function getSupertypes(): array | |
{ | |
@@ -67,27 +69,29 @@ | |
return $this->reflection->getInterfaceNames(); | |
} | |
- /** | |
- * @psalm-assert array<string, Parameter> $this->parameters | |
- */ | |
- private function reflectParameters(): void | |
+ private function reflectParameters() | |
{ | |
$this->parameters = []; | |
- $constructor = $this->reflection->getConstructor(); | |
- | |
- if ($constructor === null) { | |
+ if (! $this->reflection->hasMethod('__construct')) { | |
return; | |
} | |
- foreach ($constructor->getParameters() as $parameterReflection) { | |
+ $method = $this->reflection->getMethod('__construct'); | |
+ | |
+ /** @var ReflectionParameter $parameterReflection */ | |
+ foreach ($method->getParameters() as $parameterReflection) { | |
$parameter = new Parameter($parameterReflection); | |
$this->parameters[$parameter->getName()] = $parameter; | |
} | |
+ | |
+ uasort($this->parameters, function (ParameterInterface $a, ParameterInterface $b) { | |
+ return $a->getPosition() - $b->getPosition(); | |
+ }); | |
} | |
/** | |
- * @return array<string, Parameter> | |
+ * @return Parameter[] | |
*/ | |
public function getParameters(): array | |
{ | |
--- ../244p8/./vendor/laminas/laminas-di/src/Definition/Reflection/Parameter.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Definition/Reflection/Parameter.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -5,8 +5,6 @@ | |
namespace Laminas\Di\Definition\Reflection; | |
use Laminas\Di\Definition\ParameterInterface; | |
-use Laminas\Di\Exception\UnsupportedReflectionTypeException; | |
-use ReflectionNamedType; | |
use ReflectionParameter; | |
/** | |
@@ -58,22 +56,14 @@ | |
* {@inheritDoc} | |
* | |
* @see ParameterInterface::getType() | |
- * | |
- * @throws UnsupportedReflectionTypeException | |
*/ | |
public function getType(): ?string | |
{ | |
- $type = $this->reflection->getType(); | |
- | |
- if (! $type) { | |
- return null; | |
+ if ($this->reflection->hasType()) { | |
+ return $this->reflection->getType()->getName(); | |
} | |
- if (! $type instanceof ReflectionNamedType) { | |
- throw UnsupportedReflectionTypeException::fromUnionOrIntersectionType($type); | |
- } | |
- | |
- return $type->getName(); | |
+ return null; | |
} | |
/** | |
@@ -90,21 +80,14 @@ | |
* {@inheritDoc} | |
* | |
* @see ParameterInterface::isScalar() | |
- * | |
- * @throws UnsupportedReflectionTypeException | |
*/ | |
public function isBuiltin(): bool | |
{ | |
+ if ($this->reflection->hasType()) { | |
$type = $this->reflection->getType(); | |
- | |
- if (! $type) { | |
- return false; | |
+ return $type !== null ? $type->isBuiltin() : false; | |
} | |
- if (! $type instanceof ReflectionNamedType) { | |
- throw UnsupportedReflectionTypeException::fromUnionOrIntersectionType($type); | |
- } | |
- | |
- return $type->isBuiltin(); | |
+ return false; | |
} | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/Definition/DefinitionInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Definition/DefinitionInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -14,7 +14,7 @@ | |
/** | |
* All class names in this definition | |
* | |
- * @return list<string> | |
+ * @return string[] | |
*/ | |
public function getClasses(): array; | |
@@ -24,7 +24,6 @@ | |
public function hasClass(string $class): bool; | |
/** | |
- * @param class-string $class | |
* @throws ClassNotFoundException | |
*/ | |
public function getClassDefinition(string $class): ClassDefinitionInterface; | |
--- ../244p8/./vendor/laminas/laminas-di/src/Config.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Config.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -6,18 +6,15 @@ | |
use ArrayAccess; | |
-use function array_filter; | |
use function array_keys; | |
-use function array_map; | |
use function class_exists; | |
use function interface_exists; | |
use function is_array; | |
-use function is_string; | |
/** | |
* Provides a DI configuration from an array. | |
* | |
- * This configures the instantiation process of the dependency injector. | |
+ * This configures the instanciation process of the dependency injector. | |
* | |
* **Example:** | |
* | |
@@ -30,17 +27,17 @@ | |
* // the types the dependency injector should prefer. | |
* Some\Interface::class => Some\Preference::class | |
* ], | |
- * // This configures the instantiation of specific types. | |
+ * // This configures the instanciation of specific types. | |
* // Types may also be purely virtual by defining the aliasOf key. | |
* 'types' => [ | |
* My\Class::class => [ | |
* 'preferences' => [ | |
* // this supercedes the global type preferences | |
- * // when My\Class is instantiated | |
+ * // when My\Class is instanciated | |
* Some\Interface::class => 'My.SpecificAlias' | |
* ], | |
* | |
- * // instantiation parameters. These will only be used for | |
+ * // Instanciation paramters. These will only be used for | |
* // the instantiator (i.e. the constructor) | |
* 'parameters' => [ | |
* 'foo' => My\FooImpl::class, // Use the given type to provide the injection (depends on definition) | |
@@ -74,38 +71,31 @@ | |
* For classes known from the definitions, a type preference might be the | |
* better approach | |
* | |
- * @see \Laminas\Di\Resolver\ValueInjection A container to force injection of a value | |
- * @see \Laminas\Di\Resolver\TypeInjection A container to force looking up a specific type instance for injection | |
- * | |
- * @psalm-type TypeConfigArray = array{ | |
- * typeOf?: class-string|null, | |
- * preferences?: array<string, string>|null, | |
- * parameters?: array<string, mixed>|null | |
- * } | |
+ * @see Laminas\Di\Resolver\ValueInjection A container to force injection of a value | |
+ * @see Laminas\Di\Resolver\TypeInjection A container to force looking up a specific type instance for injection | |
*/ | |
class Config implements ConfigInterface | |
{ | |
/** @var array */ | |
protected $preferences = []; | |
- /** @var array<array> */ | |
+ /** @var array */ | |
protected $types = []; | |
/** | |
- * Construct from options array | |
+ * Construct from option array | |
* | |
* Utilizes the given options array or traversable. | |
* | |
- * @param array<mixed>|ArrayAccess<mixed, mixed> $options The options array. | |
+ * @param array|ArrayAccess $options The options array. Traversables will | |
+ * be converted to an array internally. | |
* @throws Exception\InvalidArgumentException | |
*/ | |
public function __construct($options = []) | |
{ | |
$this->ensureArrayOrArrayAccess($options); | |
- $this->preferences = $this->getDataFromArray($options, 'preferences'); | |
- | |
- /** @psalm-var array<array> Psalm does not catch the array filter with type predicate */ | |
- $this->types = array_filter($this->getDataFromArray($options, 'types'), 'is_array'); | |
+ $this->preferences = $this->getDataFromArray($options, 'preferences') ?: []; | |
+ $this->types = $this->getDataFromArray($options, 'types') ?: []; | |
} | |
/** | |
@@ -113,7 +103,6 @@ | |
*/ | |
private function getDataFromArray($data, string $key): array | |
{ | |
- /** @var mixed $result */ | |
$result = $data[$key] ?? []; | |
return is_array($result) ? $result : []; | |
} | |
@@ -121,15 +110,11 @@ | |
/** | |
* {@inheritDoc} | |
* | |
- * @see \Laminas\Di\ConfigInterface::getClassForAlias() | |
+ * @see Laminas\Di\ConfigInterface::getClassForAlias() | |
*/ | |
public function getClassForAlias(string $name): ?string | |
{ | |
- if ( | |
- isset($this->types[$name]['typeOf']) | |
- && is_string($this->types[$name]['typeOf']) | |
- && (class_exists($this->types[$name]['typeOf']) || interface_exists($this->types[$name]['typeOf'])) | |
- ) { | |
+ if (isset($this->types[$name]['typeOf'])) { | |
return $this->types[$name]['typeOf']; | |
} | |
@@ -137,10 +122,10 @@ | |
} | |
/** | |
- * Returns the instantiation parameters for the given type | |
+ * Returns the instanciation paramters for the given type | |
* | |
* @param string $type The alias or class name | |
- * @return array<mixed> The configured parameters | |
+ * @return array The configured parameters | |
*/ | |
public function getParameters(string $type): array | |
{ | |
@@ -154,10 +139,9 @@ | |
/** | |
* {@inheritDoc} | |
* | |
- * @see \Laminas\Di\ConfigInterface::setParameters() | |
+ * @see Laminas\Di\ConfigInterface::setParameters() | |
* | |
* @return $this | |
- * @param array<mixed> $params | |
*/ | |
public function setParameters(string $type, array $params) | |
{ | |
@@ -165,26 +149,24 @@ | |
return $this; | |
} | |
- public function getTypePreference(string $type, ?string $contextClass = null): ?string | |
+ public function getTypePreference(string $type, ?string $context = null): ?string | |
{ | |
- if ($contextClass) { | |
- return $this->getTypePreferenceForClass($type, $contextClass); | |
+ if ($context) { | |
+ return $this->getTypePreferenceForClass($type, $context); | |
} | |
if (! isset($this->preferences[$type])) { | |
return null; | |
} | |
- /** @var mixed $preference */ | |
$preference = $this->preferences[$type]; | |
- | |
return $preference !== '' ? (string) $preference : null; | |
} | |
/** | |
* {@inheritDoc} | |
* | |
- * @see \Laminas\Di\ConfigInterface::getTypePreferencesForClass() | |
+ * @see Laminas\Di\ConfigInterface::getTypePreferencesForClass() | |
*/ | |
private function getTypePreferenceForClass(string $type, ?string $context): ?string | |
{ | |
@@ -192,9 +174,7 @@ | |
return null; | |
} | |
- /** @var mixed $preference */ | |
$preference = $this->types[$context]['preferences'][$type]; | |
- | |
return $preference !== '' ? (string) $preference : null; | |
} | |
@@ -212,18 +192,15 @@ | |
* {@inheritDoc} | |
* | |
* @see ConfigInterface::getConfiguredTypeNames() | |
- * | |
- * @return list<string> | |
*/ | |
public function getConfiguredTypeNames(): array | |
{ | |
- return array_map('strval', array_keys($this->types)); | |
+ return array_keys($this->types); | |
} | |
public function setTypePreference(string $type, string $preference, ?string $context = null): self | |
{ | |
if ($context) { | |
- /** @psalm-suppress MixedArrayAssignment TODO: Eliminate array structures with the next releases */ | |
$this->types[$context]['preferences'][$type] = $preference; | |
return $this; | |
} | |
@@ -247,10 +224,8 @@ | |
return $this; | |
} | |
- /** | |
- * @psalm-assert array|ArrayAccess $options | |
- */ | |
- private function ensureArrayOrArrayAccess(mixed $options): void | |
+ /** @param array|ArrayAccess $options */ | |
+ private function ensureArrayOrArrayAccess($options): void | |
{ | |
if (! is_array($options) && ! $options instanceof ArrayAccess) { | |
throw new Exception\InvalidArgumentException( | |
--- ../244p8/./vendor/laminas/laminas-di/src/InjectorInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/InjectorInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -17,11 +17,9 @@ | |
/** | |
* Create a new instance of a class or alias | |
* | |
- * @template T of object | |
- * @param string|class-string<T> $name | |
- * @param array<mixed> $options Parameters used for instantiation | |
- * @return T The resulting instance | |
- * @throws Exception\ExceptionInterface When an error occours during instantiation. | |
+ * @param array $options Parameters used for instanciation | |
+ * @return object The resulting instace | |
+ * @throws Exception\ExceptionInterface When an error occours during instanciation. | |
*/ | |
public function create(string $name, array $options = []); | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/GeneratedInjectorDelegator.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/GeneratedInjectorDelegator.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -13,10 +13,7 @@ | |
class GeneratedInjectorDelegator | |
{ | |
/** | |
- * @psalm-suppress MixedAssignment Laminas config is an untyped array - types should be ensured internally | |
- * @psalm-suppress MixedArrayAccess Laminas config is an untyped array - types should be ensured internally | |
* @param string $name | |
- * @param callable():InjectorInterface $callback | |
*/ | |
public function __invoke(ContainerInterface $container, $name, callable $callback): InjectorInterface | |
{ | |
@@ -31,10 +28,9 @@ | |
} | |
$injector = $callback(); | |
- $generatedInjector = $namespace . '\\GeneratedInjector'; | |
+ $generatedInjector = $namespace . '\\GeneratedInjector'; | |
if (class_exists($generatedInjector)) { | |
- /** @psalm-var class-string<InjectorInterface> $generatedInjector */ | |
return new $generatedInjector($injector); | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/ConfigInterface.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/ConfigInterface.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -21,24 +21,19 @@ | |
/** | |
* Returns the actual class name for an alias | |
- * | |
- * @return class-string|null | |
*/ | |
public function getClassForAlias(string $name): ?string; | |
/** | |
- * Returns the instantiation parameters for the given type | |
+ * Returns the instanciation parameters for the given type | |
* | |
* @param string $type The alias or class name | |
- * @return array<array-key, mixed> The configured parameters | |
+ * @return array The configured parameter hash | |
*/ | |
public function getParameters(string $type): array; | |
/** | |
- * Set the instantiation parameters for the given type | |
- * | |
- * @param array<array-key, mixed> $params | |
- * @return mixed | |
+ * Set the instanciation parameters for the given type | |
*/ | |
public function setParameters(string $type, array $params); | |
--- ../244p8/./vendor/laminas/laminas-di/src/LegacyConfig.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/LegacyConfig.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -10,12 +10,10 @@ | |
use Traversable; | |
use function array_pop; | |
-use function assert; | |
use function class_exists; | |
+use function interface_exists; | |
use function is_array; | |
-use function is_iterable; | |
-use function is_string; | |
-use function str_contains; | |
+use function strpos; | |
use function trigger_error; | |
use const E_USER_DEPRECATED; | |
@@ -26,7 +24,7 @@ | |
class LegacyConfig extends Config | |
{ | |
/** | |
- * @param iterable<mixed>|ArrayAccess<mixed, mixed> $config | |
+ * @param array|ArrayAccess $config | |
*/ | |
public function __construct($config) | |
{ | |
@@ -36,29 +34,25 @@ | |
$config = ArrayUtils::iteratorToArray($config); | |
} | |
- /** @psalm-suppress DocblockTypeContradiction Can this whole typecheck statement be dropped? */ | |
- if (! is_array($config) && ! $config instanceof ArrayAccess) { | |
+ if (! is_array($config)) { | |
throw new Exception\InvalidArgumentException('Config data must be an array or implement Traversable'); | |
} | |
- if (isset($config['instance']) && is_iterable($config['instance'])) { | |
+ if (isset($config['instance'])) { | |
$this->configureInstance($config['instance']); | |
} | |
} | |
/** | |
- * @psalm-suppress MixedAssignment | |
- * @param iterable<mixed> $parameters | |
- * @return array<array-key, mixed> | |
+ * @param mixed $parameters | |
+ * @return mixed[] | |
*/ | |
- private function prepareParametersArray($parameters): array | |
+ private function prepareParametersArray($parameters, string $class) | |
{ | |
$prepared = []; | |
foreach ($parameters as $key => $value) { | |
- $key = (string) $key; | |
- | |
- if (str_contains($key, ':')) { | |
+ if (strpos($key, ':') !== false) { | |
trigger_error('Full qualified parameter positions are no longer supported', E_USER_DEPRECATED); | |
} | |
@@ -69,48 +63,37 @@ | |
} | |
/** | |
- * @psalm-suppress MixedAssignment | |
- * @param iterable<mixed> $config | |
+ * @param iterable $config | |
*/ | |
- private function configureInstance($config): void | |
+ private function configureInstance($config) | |
{ | |
- /** @var mixed $data*/ | |
foreach ($config as $target => $data) { | |
switch ($target) { | |
case 'aliases': | |
case 'alias': | |
- assert(is_iterable($data)); | |
- | |
foreach ($data as $name => $class) { | |
- if (is_string($class) && class_exists($class)) { | |
- $this->setAlias((string) $name, $class); | |
+ if (class_exists($class) || interface_exists($class)) { | |
+ $this->setAlias($name, $class); | |
} | |
} | |
- | |
break; | |
case 'preferences': | |
case 'preference': | |
- assert(is_iterable($data)); | |
- | |
foreach ($data as $type => $pref) { | |
$preference = is_array($pref) ? array_pop($pref) : $pref; | |
- $this->setTypePreference((string) $type, (string) $preference); | |
+ $this->setTypePreference($type, $preference); | |
} | |
- | |
break; | |
default: | |
- assert(is_string($target)); | |
- | |
- $config = new Parameters(is_array($data) ? $data : []); | |
+ $config = new Parameters($data); | |
$parameters = $config->get('parameters', $config->get('parameter')); | |
- if (is_iterable($parameters)) { | |
- $parameters = $this->prepareParametersArray($parameters); | |
+ if (is_array($parameters) || $parameters instanceof Traversable) { | |
+ $parameters = $this->prepareParametersArray($parameters, $target); | |
$this->setParameters($target, $parameters); | |
} | |
- | |
break; | |
} | |
} | |
--- ../244p8/./vendor/laminas/laminas-di/src/ConfigProvider.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/ConfigProvider.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -4,21 +4,19 @@ | |
namespace Laminas\Di; | |
+use Zend\Di\CodeGenerator\InjectorGenerator as LegacyInjectorGenerator; | |
+use Zend\Di\ConfigInterface as LegacyConfigInterface; | |
+use Zend\Di\InjectorInterface as LegacyInjectorInterfae; | |
+ | |
/** | |
* Implements the config provider for mezzio | |
- * | |
- * @psalm-type DependencyConfigArray = array{ | |
- * aliases: array<string, string>, | |
- * factories: array<string, callable|class-string>, | |
- * abstract_factories: list<callable|class-string> | |
- * } | |
*/ | |
class ConfigProvider | |
{ | |
/** | |
* Implements the config provider | |
* | |
- * @return array{dependencies: DependencyConfigArray} The configuration for mezzio | |
+ * @return array The configuration for mezzio | |
*/ | |
public function __invoke(): array | |
{ | |
@@ -29,17 +27,15 @@ | |
/** | |
* Returns the dependency (service manager) configuration | |
- * | |
- * @return DependencyConfigArray | |
*/ | |
public function getDependencyConfig(): array | |
{ | |
return [ | |
// Legacy Zend Framework aliases | |
'aliases' => [ | |
- 'Zend\Di\InjectorInterface' => InjectorInterface::class, | |
- 'Zend\Di\ConfigInterface' => ConfigInterface::class, | |
- 'Zend\Di\CodeGenerator\InjectorGenerator' => CodeGenerator\InjectorGenerator::class, | |
+ LegacyInjectorInterfae::class => InjectorInterface::class, | |
+ LegacyConfigInterface::class => ConfigInterface::class, | |
+ LegacyInjectorGenerator::class => CodeGenerator\InjectorGenerator::class, | |
], | |
'factories' => [ | |
InjectorInterface::class => Container\InjectorFactory::class, | |
--- ../244p8/./vendor/laminas/laminas-di/src/Module.php 2024-05-02 14:56:18.000000000 +0200 | |
+++ ./vendor/laminas/laminas-di/src/Module.php 2021-09-21 17:41:36.000000000 +0200 | |
@@ -20,15 +20,11 @@ | |
* ] | |
* ]; | |
* </code> | |
- * | |
- * @psalm-import-type DependencyConfigArray from ConfigProvider | |
*/ | |
class Module | |
{ | |
/** | |
* Returns the configuration for laminas-mvc | |
- * | |
- * @return array{service_manager: DependencyConfigArray} | |
*/ | |
public function getConfig(): array | |
{ | |
--- ../244p8/./vendor/autoload.php 2024-06-11 10:35:20.818889926 +0200 | |
+++ ./vendor/autoload.php 2024-06-11 10:35:28.827886886 +0200 | |
@@ -22,4 +22,4 @@ | |
require_once __DIR__ . '/composer/autoload_real.php'; | |
-return ComposerAutoloaderInit093f64846a4dd9805b4571d3814985fc::getLoader(); | |
+return ComposerAutoloaderInit5955100c9022b4cf29918df314c113d8::getLoader(); | |
--- ../244p8/./vendor/magento/module-inventory-in-store-pickup-sales-api/Test/Api/OrderPlacementBase.php 2022-03-08 00:50:20.000000000 +0100 | |
+++ ./vendor/magento/module-inventory-in-store-pickup-sales-api/Test/Api/OrderPlacementBase.php 2024-06-05 06:18:34.000000000 +0200 | |
@@ -108,7 +108,7 @@ | |
$addressData = $this->getBaseAddressData(); | |
if ($addressId) { | |
- $addressData['id'] = $addressId; | |
+ $addressData['customer_address_id'] = $addressId; | |
} | |
if ($saveInAddressBook) { | |
--- ../244p8/./vendor/magento/module-sales/Helper/Admin.php 2024-02-07 09:08:34.000000000 +0100 | |
+++ ./vendor/magento/module-sales/Helper/Admin.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -160,68 +160,6 @@ | |
*/ | |
public function escapeHtmlWithLinks($data, $allowedTags = null) | |
{ | |
- if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) { | |
- $wrapperElementId = uniqid(); | |
- $domDocument = $this->domDocumentFactory->create(); | |
- | |
- $internalErrors = libxml_use_internal_errors(true); | |
- | |
- $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8'); | |
- $domDocument->loadHTML( | |
- '<html><body id="' . $wrapperElementId . '">' . $data . '</body></html>' | |
- ); | |
- | |
- libxml_use_internal_errors($internalErrors); | |
- | |
- $linkTags = $domDocument->getElementsByTagName('a'); | |
- | |
- foreach ($linkTags as $linkNode) { | |
- $linkAttributes = []; | |
- foreach ($linkNode->attributes as $attribute) { | |
- $linkAttributes[$attribute->name] = $attribute->value; | |
- } | |
- | |
- foreach ($linkAttributes as $attributeName => $attributeValue) { | |
- if ($attributeName === 'href') { | |
- $url = $this->filterUrl($attributeValue ?? ''); | |
- $url = $this->escaper->escapeUrl($url); | |
- $linkNode->setAttribute('href', $url); | |
- } else { | |
- $linkNode->removeAttribute($attributeName); | |
- } | |
- } | |
- } | |
- | |
- $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); | |
- preg_match('/<body id="' . $wrapperElementId . '">(.+)<\/body><\/html>$/si', $result, $matches); | |
- $data = !empty($matches) ? $matches[1] : ''; | |
- } | |
- | |
return $this->escaper->escapeHtml($data, $allowedTags); | |
} | |
- | |
- /** | |
- * Filter the URL for allowed protocols. | |
- * | |
- * @param string $url | |
- * @return string | |
- */ | |
- private function filterUrl(string $url): string | |
- { | |
- if ($url) { | |
- //Revert the sprintf escaping | |
- // phpcs:ignore Magento2.Functions.DiscouragedFunction | |
- $urlScheme = parse_url($url, PHP_URL_SCHEME); | |
- $urlScheme = $urlScheme ? strtolower($urlScheme) : ''; | |
- if ($urlScheme !== 'http' && $urlScheme !== 'https') { | |
- $url = null; | |
- } | |
- } | |
- | |
- if (!$url) { | |
- $url = '#'; | |
- } | |
- | |
- return $url; | |
- } | |
} | |
--- ../244p8/./vendor/magento/module-admin-analytics/ViewModel/Metadata.php 2022-03-08 00:52:00.000000000 +0100 | |
+++ ./vendor/magento/module-admin-analytics/ViewModel/Metadata.php 2024-06-05 06:20:28.000000000 +0200 | |
@@ -9,7 +9,9 @@ | |
namespace Magento\AdminAnalytics\ViewModel; | |
use Magento\Config\Model\Config\Backend\Admin\Custom; | |
+use Magento\Csp\Helper\CspNonceProvider; | |
use Magento\Framework\App\Config\ScopeConfigInterface; | |
+use Magento\Framework\App\ObjectManager; | |
use Magento\Framework\App\ProductMetadataInterface; | |
use Magento\Backend\Model\Auth\Session; | |
use Magento\Framework\App\State; | |
@@ -22,6 +24,11 @@ | |
class Metadata implements ArgumentInterface | |
{ | |
/** | |
+ * @var string | |
+ */ | |
+ private $nonce; | |
+ | |
+ /** | |
* @var State | |
*/ | |
private $appState; | |
@@ -42,21 +49,32 @@ | |
private $config; | |
/** | |
+ * @var CspNonceProvider | |
+ */ | |
+ private $nonceProvider; | |
+ | |
+ /** | |
* @param ProductMetadataInterface $productMetadata | |
* @param Session $authSession | |
* @param State $appState | |
* @param ScopeConfigInterface $config | |
+ * @param CspNonceProvider|null $nonceProvider | |
*/ | |
public function __construct( | |
ProductMetadataInterface $productMetadata, | |
Session $authSession, | |
State $appState, | |
- ScopeConfigInterface $config | |
+ ScopeConfigInterface $config, | |
+ CspNonceProvider $nonceProvider = null | |
) { | |
$this->productMetadata = $productMetadata; | |
$this->authSession = $authSession; | |
$this->appState = $appState; | |
$this->config = $config; | |
+ | |
+ $this->nonceProvider = $nonceProvider ?: ObjectManager::getInstance()->get(CspNonceProvider::class); | |
+ | |
+ $this->nonce = $this->nonceProvider->generateNonce(); | |
} | |
/** | |
@@ -156,4 +174,14 @@ | |
{ | |
return $this->authSession->getUser()->getRole()->getRoleName(); | |
} | |
+ | |
+ /** | |
+ * Get a random nonce for each request. | |
+ * | |
+ * @return string | |
+ */ | |
+ public function getNonce(): string | |
+ { | |
+ return $this->nonce; | |
+ } | |
} | |
--- ../244p8/./vendor/magento/module-csp/Helper/InlineUtil.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-csp/Helper/InlineUtil.php 2024-06-05 06:20:30.000000000 +0200 | |
@@ -45,6 +45,14 @@ | |
*/ | |
private $configCollector; | |
+ /** | |
+ * @var CspNonceProvider | |
+ */ | |
+ private CspNonceProvider $nonceProvider; | |
+ | |
+ /** | |
+ * @var array[] | |
+ */ | |
private static $tagMeta = [ | |
'script' => ['id' => 'script-src', 'remote' => ['src'], 'hash' => true], | |
'style' => ['id' => 'style-src', 'remote' => [], 'hash' => true], | |
@@ -67,17 +75,20 @@ | |
* @param bool $useUnsafeHashes Use 'unsafe-hashes' policy (not supported by CSP v2). | |
* @param HtmlRenderer|null $htmlRenderer | |
* @param ConfigCollector|null $configCollector | |
+ * @param CspNonceProvider|null $nonceProvider | |
*/ | |
public function __construct( | |
DynamicCollector $dynamicCollector, | |
bool $useUnsafeHashes = false, | |
?HtmlRenderer $htmlRenderer = null, | |
- ?ConfigCollector $configCollector = null | |
+ ?ConfigCollector $configCollector = null, | |
+ ?CspNonceProvider $nonceProvider = null | |
) { | |
$this->dynamicCollector = $dynamicCollector; | |
$this->useUnsafeHashes = $useUnsafeHashes; | |
$this->htmlRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(HtmlRenderer::class); | |
$this->configCollector = $configCollector ?? ObjectManager::getInstance()->get(ConfigCollector::class); | |
+ $this->nonceProvider = $nonceProvider ?? ObjectManager::getInstance()->get(CspNonceProvider::class); | |
} | |
/** | |
@@ -200,6 +211,20 @@ | |
&& !empty(self::$tagMeta[$tagData->getTag()]['hash']) | |
&& $this->isInlineDisabled(self::$tagMeta[$tagData->getTag()]['id']) | |
) { | |
+ /** create new tagData with a nonce */ | |
+ if ($tagData->getTag() === 'script') { | |
+ $nonce = $this->nonceProvider->generateNonce(); | |
+ $tagAttributes = $tagData->getAttributes(); | |
+ $tagAttributes['nonce'] = $nonce; | |
+ $newTagData = new TagData( | |
+ $tagData->getTag(), | |
+ $tagAttributes, | |
+ $tagData->getContent(), | |
+ $tagData->isTextContent() | |
+ ); | |
+ | |
+ $tagData = $newTagData; | |
+ } else { | |
$this->dynamicCollector->add( | |
new FetchPolicy( | |
$policyId, | |
@@ -215,6 +240,7 @@ | |
); | |
} | |
} | |
+ } | |
return $tagData; | |
} | |
--- ../244p8/./vendor/magento/module-csp/Model/Mode/ConfigManager.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-csp/Model/Mode/ConfigManager.php 2024-06-05 06:20:30.000000000 +0200 | |
@@ -7,6 +7,8 @@ | |
namespace Magento\Csp\Model\Mode; | |
+use Magento\Framework\App\Request\Http; | |
+use Magento\Framework\App\ObjectManager; | |
use Magento\Csp\Api\Data\ModeConfiguredInterface; | |
use Magento\Csp\Api\ModeConfigManagerInterface; | |
use Magento\Csp\Model\Mode\Data\ModeConfigured; | |
@@ -37,15 +39,28 @@ | |
private $state; | |
/** | |
+ * @var Http | |
+ */ | |
+ private Http $request; | |
+ | |
+ /** | |
* @param ScopeConfigInterface $config | |
* @param Store $store | |
* @param State $state | |
+ * @param Http|null $request | |
*/ | |
- public function __construct(ScopeConfigInterface $config, Store $store, State $state) | |
- { | |
+ public function __construct( | |
+ ScopeConfigInterface $config, | |
+ Store $store, | |
+ State $state, | |
+ ?Http $request = null | |
+ ) { | |
$this->config = $config; | |
$this->storeModel = $store; | |
$this->state = $state; | |
+ | |
+ $this->request = $request | |
+ ?? ObjectManager::getInstance()->get(Http::class); | |
} | |
/** | |
@@ -54,25 +69,58 @@ | |
public function getConfigured(): ModeConfiguredInterface | |
{ | |
$area = $this->state->getAreaCode(); | |
+ | |
if ($area === Area::AREA_ADMINHTML) { | |
$configArea = 'admin'; | |
} elseif ($area === Area::AREA_FRONTEND) { | |
$configArea = 'storefront'; | |
} else { | |
- throw new \RuntimeException('CSP can only be configured for storefront or admin area'); | |
+ throw new \RuntimeException( | |
+ 'CSP can only be configured for storefront or admin area' | |
+ ); | |
} | |
- $reportOnly = $this->config->isSetFlag( | |
+ $reportOnly = $this->config->getValue( | |
+ sprintf( | |
+ 'csp/mode/%s_%s/report_only', | |
+ $configArea, | |
+ $this->request->getFullActionName() | |
+ ), | |
+ ScopeInterface::SCOPE_STORE, | |
+ $this->storeModel->getStore() | |
+ ); | |
+ | |
+ if ($reportOnly === null) { | |
+ // Fallback to default configuration. | |
+ $reportOnly = $this->config->getValue( | |
'csp/mode/' . $configArea .'/report_only', | |
ScopeInterface::SCOPE_STORE, | |
$this->storeModel->getStore() | |
); | |
+ } | |
+ | |
+ $reportUri = $this->config->getValue( | |
+ sprintf( | |
+ 'csp/mode/%s_%s/report_uri', | |
+ $configArea, | |
+ $this->request->getFullActionName() | |
+ ), | |
+ ScopeInterface::SCOPE_STORE, | |
+ $this->storeModel->getStore() | |
+ ); | |
+ | |
+ if (empty($reportUri)) { | |
+ // Fallback to default configuration. | |
$reportUri = $this->config->getValue( | |
'csp/mode/' . $configArea .'/report_uri', | |
ScopeInterface::SCOPE_STORE, | |
$this->storeModel->getStore() | |
); | |
+ } | |
- return new ModeConfigured($reportOnly, !empty($reportUri) ? $reportUri : null); | |
+ return new ModeConfigured( | |
+ (bool) $reportOnly, | |
+ !empty($reportUri) ? $reportUri : null | |
+ ); | |
} | |
} | |
--- ../244p8/./vendor/magento/module-csp/Model/Collector/ConfigCollector.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-csp/Model/Collector/ConfigCollector.php 2024-06-05 06:20:30.000000000 +0200 | |
@@ -11,6 +11,8 @@ | |
use Magento\Csp\Model\Collector\Config\PolicyReaderPool; | |
use Magento\Framework\App\Area; | |
use Magento\Framework\App\Config\ScopeConfigInterface; | |
+use Magento\Framework\App\ObjectManager; | |
+use Magento\Framework\App\Request\Http; | |
use Magento\Framework\App\State; | |
use Magento\Store\Model\StoreManagerInterface; | |
use Magento\Store\Model\ScopeInterface; | |
@@ -41,21 +43,31 @@ | |
private $storeManager; | |
/** | |
+ * @var Http | |
+ */ | |
+ private Http $request; | |
+ | |
+ /** | |
* @param ScopeConfigInterface $config | |
* @param PolicyReaderPool $readersPool | |
* @param State $state | |
* @param StoreManagerInterface $storeManager | |
+ * @param Http|null $request | |
*/ | |
public function __construct( | |
ScopeConfigInterface $config, | |
PolicyReaderPool $readersPool, | |
State $state, | |
- StoreManagerInterface $storeManager | |
+ StoreManagerInterface $storeManager, | |
+ ?Http $request = null | |
) { | |
$this->config = $config; | |
$this->readersPool = $readersPool; | |
$this->state = $state; | |
$this->storeManager = $storeManager; | |
+ | |
+ $this->request = $request | |
+ ?? ObjectManager::getInstance()->get(Http::class); | |
} | |
/** | |
@@ -74,11 +86,26 @@ | |
} | |
if ($configArea) { | |
- $policiesConfig = $this->config->getValue( | |
+ $policiesConfigGlobal = $this->config->getValue( | |
'csp/policies/' . $configArea, | |
ScopeInterface::SCOPE_STORE, | |
$this->storeManager->getStore() | |
); | |
+ | |
+ $policiesConfigLocal = $this->config->getValue( | |
+ sprintf( | |
+ 'csp/policies/%s_%s', | |
+ $configArea, | |
+ $this->request->getFullActionName() | |
+ ), | |
+ ScopeInterface::SCOPE_STORE, | |
+ $this->storeManager->getStore() | |
+ ); | |
+ | |
+ $policiesConfig = is_array($policiesConfigLocal) ? | |
+ array_replace_recursive($policiesConfigGlobal, $policiesConfigLocal) : | |
+ $policiesConfigGlobal; | |
+ | |
if (is_array($policiesConfig) && $policiesConfig) { | |
foreach ($policiesConfig as $policyConfig) { | |
$collected[] = $this->readersPool->getReader($policyConfig['policy_id']) | |
--- ../244p8/./vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php 2024-06-05 06:20:34.000000000 +0200 | |
@@ -141,12 +141,34 @@ | |
} else { | |
$inputData = $this->request->getRequestData(); | |
} | |
+ | |
+ $inputData = $this->filterInputData($inputData); | |
$this->validateParameters($serviceClassName, $serviceMethodName, array_keys($route->getParameters())); | |
return $this->paramsOverrider->override($inputData, $route->getParameters()); | |
} | |
/** | |
+ * Validates InputData | |
+ * | |
+ * @param array $inputData | |
+ * @return array | |
+ */ | |
+ private function filterInputData(array $inputData): array | |
+ { | |
+ $result = []; | |
+ | |
+ $data = array_filter($inputData, function ($k) use (&$result) { | |
+ $key = is_string($k) ? strtolower(str_replace('_', "", $k)) : $k; | |
+ return !isset($result[$key]) && ($result[$key] = true); | |
+ }, ARRAY_FILTER_USE_KEY); | |
+ | |
+ return array_map(function ($value) { | |
+ return is_array($value) ? $this->filterInputData($value) : $value; | |
+ }, $data); | |
+ } | |
+ | |
+ /** | |
* Retrieve current route. | |
* | |
* @return Route | |
--- ../244p8/./vendor/magento/framework/DB/Adapter/SqlVersionProvider.php 2024-04-03 13:18:08.000000000 +0200 | |
+++ ./vendor/magento/framework/DB/Adapter/SqlVersionProvider.php 2024-06-05 06:20:36.000000000 +0200 | |
@@ -131,10 +131,10 @@ | |
*/ | |
public function isMariaDBGte10427(): bool | |
{ | |
- $sqlVersion = $this->getSqlVersion(); | |
- $isMariaDB104 = str_contains($sqlVersion, SqlVersionProvider::MARIA_DB_10_4_VERSION); | |
$sqlExactVersion = $this->fetchSqlVersion(ResourceConnection::DEFAULT_CONNECTION); | |
- if ($isMariaDB104 && version_compare($sqlExactVersion, '10.4.27', '>=')) { | |
+ //check if mariadb is 10.4 or 10.5 | |
+ $pattern="/^10.([4-5]\.).*$/"; | |
+ if (preg_match($pattern, $this->getSqlVersion()) && version_compare($sqlExactVersion, '10.4.27', '>=')) { | |
return true; | |
} | |
return false; | |
--- ../244p8/./vendor/magento/framework/View/Asset/Collection.php 2024-04-03 13:18:10.000000000 +0200 | |
+++ ./vendor/magento/framework/View/Asset/Collection.php 2024-06-05 06:20:38.000000000 +0200 | |
@@ -11,7 +11,7 @@ | |
class Collection | |
{ | |
/** | |
- * Assets | |
+ * Collection of Assets | |
* | |
* @var AssetInterface[] | |
*/ | |
@@ -30,6 +30,8 @@ | |
} | |
/** | |
+ * Insert Asset after specified key | |
+ * | |
* @param string $identifier | |
* @param AssetInterface $asset | |
* @param string $key | |
@@ -47,8 +49,10 @@ | |
} | |
} | |
+ if (!empty($result)) { | |
$this->assets = $result; | |
} | |
+ } | |
/** | |
* Whether an item belongs to a collection or not | |
--- ../244p8/./vendor/magento/framework/View/Asset/GroupedCollection.php 2024-04-03 13:18:10.000000000 +0200 | |
+++ ./vendor/magento/framework/View/Asset/GroupedCollection.php 2024-06-05 06:20:38.000000000 +0200 | |
@@ -16,13 +16,17 @@ | |
/**#@+ | |
* Special properties, enforced to be grouped by | |
*/ | |
- const PROPERTY_CONTENT_TYPE = 'content_type'; | |
+ public const PROPERTY_CONTENT_TYPE = 'content_type'; | |
- const PROPERTY_CAN_MERGE = 'can_merge'; | |
+ public const PROPERTY_CAN_MERGE = 'can_merge'; | |
/**#@-*/ | |
- /**#@-*/ | |
+ /** | |
+ * Factory for PropertyGroup | |
+ * | |
+ * @var PropertyGroupFactory | |
+ */ | |
protected $propertyFactory; | |
/** | |
@@ -58,6 +62,8 @@ | |
} | |
/** | |
+ * Insert asset by after key | |
+ * | |
* @param string $identifier | |
* @param AssetInterface $asset | |
* @param string $key | |
@@ -67,10 +73,19 @@ | |
{ | |
parent::insert($identifier, $asset, $key); | |
$properties = $this->getFilteredProperties($asset); | |
- $this->getGroupFor($properties)->insert($identifier, $asset, $key); | |
+ $group = $this->getGroupFor($properties); | |
+ $groupAssets = $group->getAll(); | |
+ | |
+ if (!$groupAssets) { | |
+ //add current asset to group | |
+ $group->add($identifier, $asset); | |
+ } | |
+ $group->insert($identifier, $asset, $key); | |
} | |
/** | |
+ * Get Asset Properties | |
+ * | |
* @param AssetInterface $asset | |
* @param array $properties | |
* @return array | |
--- ../244p8/./vendor/magento/framework/Webapi/ServiceInputProcessor.php 2024-04-03 13:18:10.000000000 +0200 | |
+++ ./vendor/magento/framework/Webapi/ServiceInputProcessor.php 2024-06-05 06:20:38.000000000 +0200 | |
@@ -153,6 +153,7 @@ | |
* @return \Magento\Framework\Reflection\NameFinder | |
* | |
* @deprecated 100.1.0 | |
+ * @see nothing | |
*/ | |
private function getNameFinder() | |
{ | |
@@ -261,6 +262,7 @@ | |
* @throws \Exception | |
* @throws SerializationException | |
* @SuppressWarnings(PHPMD.CyclomaticComplexity) | |
+ * @SuppressWarnings(PHPMD.NPathComplexity) | |
*/ | |
protected function _createFromArray($className, $data) | |
{ | |
@@ -268,6 +270,12 @@ | |
// convert to string directly to avoid situations when $className is object | |
// which implements __toString method like \ReflectionObject | |
$className = (string) $className; | |
+ if (is_subclass_of($className, \SimpleXMLElement::class) | |
+ || is_subclass_of($className, \DOMElement::class)) { | |
+ throw new SerializationException( | |
+ new Phrase('Invalid data type') | |
+ ); | |
+ } | |
$class = new ClassReflection($className); | |
if (is_subclass_of($className, self::EXTENSION_ATTRIBUTES_TYPE)) { | |
$className = substr($className, 0, -strlen('Interface')); | |
--- ../244p8/./vendor/magento/framework/Filesystem/Directory/PathValidator.php 2024-04-03 13:18:08.000000000 +0200 | |
+++ ./vendor/magento/framework/Filesystem/Directory/PathValidator.php 2024-06-05 06:20:36.000000000 +0200 | |
@@ -54,7 +54,7 @@ | |
$actualPath = $this->driver->getRealPathSafety($path); | |
} | |
- if (preg_match('/(?:^-|\s-)/', $path) | |
+ if (preg_match('/(?:^-|\s-\S)/', $path) | |
|| ( | |
mb_strpos($actualPath, $realDirectoryPath) !== 0 | |
&& rtrim($path, DIRECTORY_SEPARATOR) !== $realDirectoryPath | |
--- ../244p8/./vendor/magento/module-quote/Model/BillingAddressManagement.php 2023-05-16 17:11:08.000000000 +0200 | |
+++ ./vendor/magento/module-quote/Model/BillingAddressManagement.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -77,10 +77,6 @@ | |
{ | |
/** @var \Magento\Quote\Model\Quote $quote */ | |
$quote = $this->quoteRepository->getActive($cartId); | |
- | |
- // validate the address | |
- $this->addressValidator->validateWithExistingAddress($quote, $address); | |
- | |
$address->setCustomerId($quote->getCustomerId()); | |
$quote->removeAddress($quote->getBillingAddress()->getId()); | |
$quote->setBillingAddress($address); | |
--- ../244p8/./vendor/magento/module-quote/Model/QuoteAddressValidator.php 2023-05-16 17:11:08.000000000 +0200 | |
+++ ./vendor/magento/module-quote/Model/QuoteAddressValidator.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -124,28 +124,6 @@ | |
} | |
/** | |
- * Validate Quest Address for guest user | |
- * | |
- * @param AddressInterface $address | |
- * @param CartInterface $cart | |
- * @return void | |
- * @throws NoSuchEntityException | |
- */ | |
- private function doValidateForGuestQuoteAddress(AddressInterface $address, CartInterface $cart): void | |
- { | |
- //validate guest cart address | |
- if ($address->getId() !== null) { | |
- $old = $cart->getAddressById($address->getId()); | |
- | |
- if ($old === false) { | |
- throw new NoSuchEntityException( | |
- __('Invalid quote address id %1', $address->getId()) | |
- ); | |
- } | |
- } | |
- } | |
- | |
- /** | |
* Validate address to be used for cart. | |
* | |
* @param CartInterface $cart | |
@@ -156,9 +134,6 @@ | |
*/ | |
public function validateForCart(CartInterface $cart, AddressInterface $address): void | |
{ | |
- if ($cart->getCustomerIsGuest()) { | |
- $this->doValidateForGuestQuoteAddress($address, $cart); | |
- } | |
$this->doValidate($address, $cart->getCustomerIsGuest() ? null : (int) $cart->getCustomer()->getId()); | |
} | |
@@ -174,8 +149,8 @@ | |
{ | |
// check if address belongs to quote. | |
if ($address->getId() !== null) { | |
- $old = $cart->getAddressesCollection()->getItemById($address->getId()); | |
- if ($old === null) { | |
+ $old = $cart->getAddressById($address->getId()); | |
+ if (empty($old)) { | |
throw new NoSuchEntityException( | |
__('Invalid quote address id %1', $address->getId()) | |
); | |
--- ../244p8/./vendor/magento/module-customer/Model/Plugin/UpdateCustomer.php 2024-04-03 13:18:04.000000000 +0200 | |
+++ ./vendor/magento/module-customer/Model/Plugin/UpdateCustomer.php 2024-06-05 06:20:30.000000000 +0200 | |
@@ -52,14 +52,19 @@ | |
CustomerInterface $customer, | |
?string $passwordHash = null | |
): array { | |
- $customerSessionId = $this->userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER ? | |
- (int)$this->userContext->getUserId() : 0; | |
+ $userType = $this->userContext->getUserType(); | |
+ $customerSessionId = (int)$this->userContext->getUserId(); | |
$customerId = (int)$this->request->getParam('customerId'); | |
$bodyParams = $this->request->getBodyParams(); | |
- if (!isset($bodyParams['customer']['Id']) && $customerId) { | |
- if ($customerId === $customerSessionId || $customerSessionId === 0) { | |
+ | |
+ if ($userType === UserContextInterface::USER_TYPE_CUSTOMER && | |
+ !isset($bodyParams['customer']['Id']) && | |
+ $customerId && | |
+ $customerId === $customerSessionId | |
+ ) { | |
+ $customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); | |
+ } elseif ($userType === UserContextInterface::USER_TYPE_ADMIN && $customerId) { | |
$customer = $this->getUpdatedCustomer($customerRepository->getById($customerId), $customer); | |
- } | |
} | |
return [$customer, $passwordHash]; | |
--- ../244p8/./vendor/magento/module-paypal/Block/PayLater/LayoutProcessor.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-paypal/Block/PayLater/LayoutProcessor.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -88,7 +88,8 @@ | |
$config['displayAmount'] = !$displayAmount || $this->payLaterConfig->isPPBillingAgreementEnabled() | |
? false : true; | |
$config['dataAttributes'] = [ | |
- 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode() | |
+ 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode(), | |
+ 'data-csp-nonce' => $this->paypalConfig->getCspNonce(), | |
]; | |
$attributes = $this->payLaterConfig->getSectionConfig( | |
--- ../244p8/./vendor/magento/module-paypal/Block/PayLater/Banner.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-paypal/Block/PayLater/Banner.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -97,7 +97,8 @@ | |
$config['displayAmount'] = !$displayAmount || $this->payLaterConfig->isPPBillingAgreementEnabled() | |
? false : true; | |
$config['dataAttributes'] = [ | |
- 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode() | |
+ 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode(), | |
+ 'data-csp-nonce' => $this->paypalConfig->getCspNonce(), | |
]; | |
//Extend block component attributes with defaults | |
--- ../244p8/./vendor/magento/module-paypal/Test/Unit/Model/_files/expected_style_config.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-paypal/Test/Unit/Model/_files/expected_style_config.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -29,7 +29,8 @@ | |
'isGuestCheckoutAllowed' => true, | |
'sdkUrl' => 'http://mock.url', | |
'dataAttributes' => [ | |
- 'data-partner-attribution-id' => '' | |
+ 'data-partner-attribution-id' => '', | |
+ 'data-csp-nonce' => '' | |
] | |
] | |
], | |
@@ -56,7 +57,8 @@ | |
'isGuestCheckoutAllowed' => true, | |
'sdkUrl' => 'http://mock.url', | |
'dataAttributes' => [ | |
- 'data-partner-attribution-id' => '' | |
+ 'data-partner-attribution-id' => '', | |
+ 'data-csp-nonce' => '' | |
] | |
] | |
], | |
@@ -82,7 +84,8 @@ | |
'isGuestCheckoutAllowed' => true, | |
'sdkUrl' => 'http://mock.url', | |
'dataAttributes' => [ | |
- 'data-partner-attribution-id' => '' | |
+ 'data-partner-attribution-id' => '', | |
+ 'data-csp-nonce' => '' | |
] | |
] | |
], | |
@@ -108,7 +111,8 @@ | |
'isGuestCheckoutAllowed' => true, | |
'sdkUrl' => 'http://mock.url', | |
'dataAttributes' => [ | |
- 'data-partner-attribution-id' => '' | |
+ 'data-partner-attribution-id' => '', | |
+ 'data-csp-nonce' => '' | |
] | |
] | |
], | |
--- ../244p8/./vendor/magento/module-paypal/Model/SmartButtonConfig.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-paypal/Model/SmartButtonConfig.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -11,7 +11,6 @@ | |
use Magento\Framework\App\Config\ScopeConfigInterface; | |
use Magento\Framework\Locale\ResolverInterface; | |
use Magento\Store\Model\ScopeInterface; | |
-use Magento\Store\Model\StoreManagerInterface; | |
use Magento\Paypal\Model\Config as PaypalConfig; | |
/** | |
@@ -92,7 +91,8 @@ | |
'isGuestCheckoutAllowed' => $isGuestCheckoutAllowed, | |
'sdkUrl' => $this->sdkUrl->getUrl(), | |
'dataAttributes' => [ | |
- 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode() | |
+ 'data-partner-attribution-id' => $this->paypalConfig->getBuildNotationCode(), | |
+ 'data-csp-nonce' => $this->paypalConfig->getCspNonce(), | |
] | |
]; | |
} | |
--- ../244p8/./vendor/magento/module-paypal/Model/Config.php 2022-03-08 00:52:02.000000000 +0100 | |
+++ ./vendor/magento/module-paypal/Model/Config.php 2024-06-05 06:20:32.000000000 +0200 | |
@@ -6,6 +6,8 @@ | |
namespace Magento\Paypal\Model; | |
+use Magento\Csp\Helper\CspNonceProvider; | |
+use Magento\Framework\App\ObjectManager; | |
use Magento\Payment\Helper\Formatter; | |
/** | |
@@ -14,6 +16,7 @@ | |
* Works with PayPal-specific system configuration | |
* @SuppressWarnings(PHPMD.ExcessivePublicCount) | |
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity) | |
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) | |
*/ | |
class Config extends AbstractConfig | |
{ | |
@@ -23,160 +26,160 @@ | |
/** | |
* PayPal Express | |
*/ | |
- const METHOD_EXPRESS = 'paypal_express'; | |
+ public const METHOD_EXPRESS = 'paypal_express'; | |
/** | |
* PayPal Standard - alias METHOD_WPP_EXPRESS | |
*/ | |
- const METHOD_WPS_EXPRESS = 'wps_express'; | |
+ public const METHOD_WPS_EXPRESS = 'wps_express'; | |
/** | |
* PayPal Standard Bml - alias METHOD_WPP_BML | |
*/ | |
- const METHOD_WPS_BML = 'wps_express_bml'; | |
+ public const METHOD_WPS_BML = 'wps_express_bml'; | |
/** | |
* PayPal Bill Me Later - Express Checkout | |
*/ | |
- const METHOD_WPP_BML = 'paypal_express_bml'; | |
+ public const METHOD_WPP_BML = 'paypal_express_bml'; | |
/** | |
* PayPal Website Payments Pro - Direct Payments | |
*/ | |
- const METHOD_WPP_DIRECT = 'paypal_direct'; | |
+ public const METHOD_WPP_DIRECT = 'paypal_direct'; | |
/** | |
* PayPal Website Payments Pro - Direct Payments - alias METHOD_PAYFLOWPRO | |
*/ | |
- const METHOD_PAYMENT_PRO = 'paypal_payment_pro'; | |
+ public const METHOD_PAYMENT_PRO = 'paypal_payment_pro'; | |
/** | |
* Express Checkout (Payflow Edition) | |
*/ | |
- const METHOD_WPP_PE_EXPRESS = 'payflow_express'; | |
+ public const METHOD_WPP_PE_EXPRESS = 'payflow_express'; | |
/** | |
* PayPal Bill Me Later - Express Checkout (Payflow Edition) | |
*/ | |
- const METHOD_WPP_PE_BML = 'payflow_express_bml'; | |
+ public const METHOD_WPP_PE_BML = 'payflow_express_bml'; | |
/** | |
* Payflow Pro Gateway | |
*/ | |
- const METHOD_PAYFLOWPRO = 'payflowpro'; | |
+ public const METHOD_PAYFLOWPRO = 'payflowpro'; | |
- const METHOD_PAYFLOWLINK = 'payflow_link'; | |
+ public const METHOD_PAYFLOWLINK = 'payflow_link'; | |
- const METHOD_PAYFLOWADVANCED = 'payflow_advanced'; | |
+ public const METHOD_PAYFLOWADVANCED = 'payflow_advanced'; | |
- const METHOD_HOSTEDPRO = 'hosted_pro'; | |
+ public const METHOD_HOSTEDPRO = 'hosted_pro'; | |
- const METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement'; | |
+ public const METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement'; | |
/**#@+ | |
* Buttons and images | |
*/ | |
- const EC_FLAVOR_DYNAMIC = 'dynamic'; | |
+ public const EC_FLAVOR_DYNAMIC = 'dynamic'; | |
- const EC_FLAVOR_STATIC = 'static'; | |
+ public const EC_FLAVOR_STATIC = 'static'; | |
- const EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut'; | |
+ public const EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut'; | |
- const EC_BUTTON_TYPE_MARK = 'ecmark'; | |
+ public const EC_BUTTON_TYPE_MARK = 'ecmark'; | |
- const PAYMENT_MARK_SMALL = 'small'; | |
+ public const PAYMENT_MARK_SMALL = 'small'; | |
- const PAYMENT_MARK_MEDIUM = 'medium'; | |
+ public const PAYMENT_MARK_MEDIUM = 'medium'; | |
- const PAYMENT_MARK_LARGE = 'large'; | |
+ public const PAYMENT_MARK_LARGE = 'large'; | |
/**#@-*/ | |
- const DEFAULT_LOGO_TYPE = 'wePrefer_150x60'; | |
+ public const DEFAULT_LOGO_TYPE = 'wePrefer_150x60'; | |
/**#@+ | |
* Payment actions | |
*/ | |
- const AUTHORIZATION_AMOUNT_ONE = 1; | |
+ public const AUTHORIZATION_AMOUNT_ONE = 1; | |
- const AUTHORIZATION_AMOUNT_FULL = 2; | |
+ public const AUTHORIZATION_AMOUNT_FULL = 2; | |
/**#@-*/ | |
/**#@+ | |
* Require Billing Address | |
*/ | |
- const REQUIRE_BILLING_ADDRESS_NO = 0; | |
+ public const REQUIRE_BILLING_ADDRESS_NO = 0; | |
- const REQUIRE_BILLING_ADDRESS_ALL = 1; | |
+ public const REQUIRE_BILLING_ADDRESS_ALL = 1; | |
- const REQUIRE_BILLING_ADDRESS_VIRTUAL = 2; | |
+ public const REQUIRE_BILLING_ADDRESS_VIRTUAL = 2; | |
/**#@-*/ | |
/**#@+ | |
* Fraud management actions | |
*/ | |
- const FRAUD_ACTION_ACCEPT = 'Acept'; | |
+ public const FRAUD_ACTION_ACCEPT = 'Acept'; | |
- const FRAUD_ACTION_DENY = 'Deny'; | |
+ public const FRAUD_ACTION_DENY = 'Deny'; | |
/**#@-*/ | |
/**#@+ | |
* Refund types | |
*/ | |
- const REFUND_TYPE_FULL = 'Full'; | |
+ public const REFUND_TYPE_FULL = 'Full'; | |
- const REFUND_TYPE_PARTIAL = 'Partial'; | |
+ public const REFUND_TYPE_PARTIAL = 'Partial'; | |
/**#@-*/ | |
/**#@+ | |
* Express Checkout flows | |
*/ | |
- const EC_SOLUTION_TYPE_SOLE = 'Sole'; | |
+ public const EC_SOLUTION_TYPE_SOLE = 'Sole'; | |
- const EC_SOLUTION_TYPE_MARK = 'Mark'; | |
+ public const EC_SOLUTION_TYPE_MARK = 'Mark'; | |
/**#@-*/ | |
/**#@+ | |
* Payment data transfer methods (Standard) | |
*/ | |
- const WPS_TRANSPORT_IPN = 'ipn'; | |
+ public const WPS_TRANSPORT_IPN = 'ipn'; | |
- const WPS_TRANSPORT_PDT = 'pdt'; | |
+ public const WPS_TRANSPORT_PDT = 'pdt'; | |
- const WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt'; | |
+ public const WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt'; | |
/**#@-*/ | |
/**#@+ | |
* Billing Agreement Signup type | |
*/ | |
- const EC_BA_SIGNUP_AUTO = 'auto'; | |
+ public const EC_BA_SIGNUP_AUTO = 'auto'; | |
- const EC_BA_SIGNUP_ASK = 'ask'; | |
+ public const EC_BA_SIGNUP_ASK = 'ask'; | |
- const EC_BA_SIGNUP_NEVER = 'never'; | |
+ public const EC_BA_SIGNUP_NEVER = 'never'; | |
/** | |
* Paypal setting | |
*/ | |
- const TRANSFER_CART_LINE_ITEMS = 'lineItemsEnabled'; | |
- const TRANSFER_SHIPPING_OPTIONS = 'transferShippingOptions'; | |
+ public const TRANSFER_CART_LINE_ITEMS = 'lineItemsEnabled'; | |
+ public const TRANSFER_SHIPPING_OPTIONS = 'transferShippingOptions'; | |
/**#@-*/ | |
/** | |
* Config path for enabling/disabling order review step in express checkout | |
*/ | |
- const XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG = 'payment/paypal_express/skip_order_review_step'; | |
+ public const XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG = 'payment/paypal_express/skip_order_review_step'; | |
/** | |
* PayPal PayLater | |
*/ | |
- const PAYLATER = 'paypal_paylater'; | |
+ public const PAYLATER = 'paypal_paylater'; | |
/** | |
* | |
@@ -600,12 +603,18 @@ | |
protected $_certFactory; | |
/** | |
+ * @var CspNonceProvider | |
+ */ | |
+ protected $cspNonceProvider; | |
+ | |
+ /** | |
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig | |
* @param \Magento\Directory\Helper\Data $directoryHelper | |
* @param \Magento\Store\Model\StoreManagerInterface $storeManager | |
* @param \Magento\Payment\Model\Source\CctypeFactory $cctypeFactory | |
* @param CertFactory $certFactory | |
* @param array $params | |
+ * @param CspNonceProvider|null $cspNonceProvider | |
*/ | |
public function __construct( | |
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, | |
@@ -613,7 +622,8 @@ | |
\Magento\Store\Model\StoreManagerInterface $storeManager, | |
\Magento\Payment\Model\Source\CctypeFactory $cctypeFactory, | |
\Magento\Paypal\Model\CertFactory $certFactory, | |
- $params = [] | |
+ $params = [], | |
+ CspNonceProvider $cspNonceProvider = null | |
) { | |
parent::__construct($scopeConfig); | |
$this->directoryHelper = $directoryHelper; | |
@@ -628,6 +638,8 @@ | |
$this->setStoreId($storeId); | |
} | |
} | |
+ | |
+ $this->cspNonceProvider = $cspNonceProvider ?: ObjectManager::getInstance()->get(CspNonceProvider::class); | |
} | |
/** | |
@@ -1845,4 +1857,15 @@ | |
$this->_storeId | |
); | |
} | |
+ | |
+ /** | |
+ * Get a cps nonce for the current request | |
+ * | |
+ * @return string | |
+ * @throws \Magento\Framework\Exception\LocalizedException | |
+ */ | |
+ public function getCspNonce(): string | |
+ { | |
+ return $this->cspNonceProvider->generateNonce(); | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment