subscribepro / subscribepro-magento2-ext
Subscribe Pro Magento 2 集成扩展
1.7.3
2024-09-20 14:06 UTC
Requires
- magento/framework: ^101.0.0|^102.0.0|^103.0.0
- magento/module-backend: ^100.2.0|^101.0.0|^102.0.0
- magento/module-checkout: ^100.2.0|^100.3.0|^100.4.0
- magento/module-customer: ^101.0.0|^102.0.0|^103.0.0
- magento/module-payment: ^100.2.0|^100.3.0|^100.4.0
- magento/module-quote: ^101.0.0|^101.1.0|^101.2.0
- magento/module-sales: ^101.0.0|^102.0.0|^103.0.0
- magento/module-store: ^100.2.0|^101.0.0|^101.1.0
- magento/module-theme: ^100.2.0|^101.0.0|^101.1.0
- magento/module-ui: ^101.0.0|^101.1.0|^101.2.0
- magento/module-vault: ^101.0.0|^101.1.0|^101.2.0
- subscribepro/subscribepro-php: ~1.1.6
Requires (Dev)
- magento/zendframework1: 1.12.16
- monolog/monolog: ^2.8
- zendframework/zend-stdlib: ~2.4.6
- dev-main
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.16
- 1.5.15
- 1.5.14
- 1.5.13
- 1.5.12
- 1.5.11
- 1.5.10
- 1.5.9
- 1.5.8
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.11
- 1.1.10
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.9.0
- dev-fix/278-shq
- dev-fix/284-add-card-button
- dev-fix/282-cart-rule-conditions
- dev-249-clicking-cancel-link
- dev-241-possible-fix-for-gateway-issue
- dev-202-update-platform-customer-id-on-save
- dev-224-challenge-does-not-fit
- dev-197-switch-credit-card-tokenization-to-use-sp-paymentfields
- dev-feature/45-pass-company-wit-address
- dev-remove-phone-number-required
This package is auto-updated.
Last update: 2024-09-20 14:08:20 UTC
README
这是 Subscribe Pro 的官方 Magento 2 扩展。
要了解更多关于 Subscribe Pro 的信息,您可以访问我们的网站 https://www.subscribepro.com/。
入门指南
请访问我们的文档网站,并从我们的 Magento 2 步骤指南开始: https://docs.subscribepro.com/display/spd/Install+Subscribe+Pro+for+Magento+2
通过 Composer 安装
您可以通过 Composer 安装我们的 Subscribe Pro Magento 2 扩展。请在您的 Magento 安装根目录下运行以下命令
composer require subscribepro/subscribepro-magento2-ext php bin/magento module:enable Swarming_SubscribePro php bin/magento setup:upgrade
编码标准
Subscribe Pro 团队遵循 https://devdocs.magento.com 中描述的标准
- https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html - 此文档的目的是解释代码应该如何格式化,对于 PHP 开发者的主要思想是 "使用 codesniffer"。提供了有关如何设置的有用且简洁的说明。codesniffer 强加的规则基于 PSR12 标准(见 https://www.php-fig.org/psr/psr-1/ https://www.php-fig.org/psr/psr-2/ https://www.php-fig.org/psr/psr-12/),可能太多以至于人类难以记住并始终如一地应用,因此官方 Magento 团队无论如何都不会提供人类可读的描述。
- https://devdocs.magento.com/guides/v2.4/coding-standards/technical-guidelines.html - 此文档描述了语义要求和最佳编码实践。
- https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-javascript.html - JS 编码标准。
- https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-less.html - less 编码标准。
- https://devdocs.magento.com/guides/v2.4/coding-standards/code-standard-html.html - HTML 编码标准。
Subscribe Pro 的内部编码标准
- 在 PHPDoc 中使用完全限定的类名,例如
这可以在浏览代码时使代码更清晰,在处理具有相似名称但属于不同命名空间类的代码时,留下的歧义更少。在 IDE 中,如果使用别名,则不需要双击 Ctrl+click 实际查看类。这也消除了仅为了编写 phpdoc/comment 而包含不必要的 use 操作符的情况。/** * @param \Magento\Framework\App\RequestInterface $request * @return bool */
- 类型转换后不留空格,例如
在编写本文档时,现有的 PHP 标准没有规定这一点,因此选择“不留空格”。(int)$variable
要确认项目符合 PHP_CodeSniffer 标准化
运行 PHP_CodeSniffer
vendor/bin/phpcs -s \ --standard=Magento2 app/code/Swarming/SubscribePro \ --extensions=phtml \ --error-severity=10 \ --ignore-annotations \ --exclude=Magento2.Annotation.MethodAnnotationStructure \ app/code/Swarming/SubscribePro
通过 PHP Code Beautifier 和 Fixer 自动修复某些问题
bin/phpcbf --standard=Magento2 \ --extensions=phtml \ --error-severity=10 \ --ignore-annotations \ --exclude=Magento2.Annotation.MethodAnnotationStructure \ app/code/Swarming/SubscribePro
运行 phpstan
bin/analyse app/code/Swarming/SubscribePro --level=1 -c app/code/Swarming/SubscribePro/phpstan.neon
运行 PHP Coding Standards Fixer (php-cs-fixer
)
php-cs-fixer fix src/app/code/Swarming/SubscribePro