riconet / t3-extension-skeleton
此包已被废弃,不再维护。没有建议替代包。
此项目包含TYPO3-Extbase扩展的框架。
9.5.5
2020-02-24 12:37 UTC
Requires
- php: ^7.0
Replaces
- riconet/extension-skeleton: 9.5.5
README
需要了解
- 此项目假设您使用gitlab来托管您的扩展。
- 目前定义的供应商是静态的(这很快就会改变,请放心。)
- 目前不支持Windows。
描述
此composer项目是为了简化创建新的TYPO3 CMS扩展的过程而创建的。此设置包含创建扩展的常用文件和文件夹。它还提供配置以运行单元测试和功能测试,并附带一个完整的gitlab-ci.yml文件。
如何创建新的扩展/如何使用此项目
打开您的shell,导航到您即将创建的扩展的位置。执行以下命令,并记住为您的扩展定义一个名称。
composer create-project riconet/t3-extension-skeleton:VERSION EXTENSION_KEY
如何运行测试
在您编写了一些测试文件后,在扩展的根目录中运行composer install。这将在扩展中创建一个名为.Build
的新文件夹。此文件夹包含一个带有您扩展的TYPO3实例(shell脚本用于测试执行和docker-compose.yml)。您还可以运行代码质量检查以检查您的源代码。要运行测试,请执行脚本Build/Scripts/runTests.sh
。
如何使用runTests.sh脚本
扩展测试运行器。执行单元测试套件和其他一些细节。
选项
-s <...>
Specifies which test suite to run
- build: Builds the project (composer)
- lint: Lints the php files
- functional: functional tests
- unit (default): PHP unit tests
- quality: executes code quality checks (phpstan, phpcs, phpmd)
- find-debugs: Finds usages of debug calls.
-p <7.0|7.1|7.2|7.3>
Specifies the PHP minor version to be used
- 7.0 (default): use PHP 7.0
- 7.3: use PHP 7.3
-e "<phpunit options>"
Only with -s functional|unit
Additional options to send to phpunit (unit & functional tests).
Starting with "--" must be added after options starting with "-".
Example -e "-v --filter canRetrieveValueWithGP" to enable verbose output AND filter tests
named "canRetrieveValueWithGP"
-h
Show this help.
示例
运行单元测试:
/Build/Scripts/runTests.sh -s unit