The command cake bake project, which creates a project for a CakePHP 2 app, fails in PHP 8.0+ due to an undefined TESTS constant.
< PHP 8.0, it worked with a warning.
This bug occurs when executing the command before the project is generated:
vendor/bin/cake bake project …
but not when executing the command after it is generated:
app/Console/cake bake project …
Currently, there is almost no opportunity to create a new CakePHP 2 project. However, I would like to fix this command because I use it in the following situations.
Generate a project in CI step of the plugin repository
Description
The command
cake bake project
, which creates a project for a CakePHP 2 app, fails in PHP 8.0+ due to an undefinedTESTS
constant. < PHP 8.0, it worked with a warning.This bug occurs when executing the command before the project is generated:
but not when executing the command after it is generated:
Currently, there is almost no opportunity to create a new CakePHP 2 project. However, I would like to fix this command because I use it in the following situations.
How to reproduce the defect
PHP Version
Temporary workaround
Create temporary
TESTS
const in TestTask in the vendor directory.