Skip to content

Commit 706e21f

Browse files
TavoNiievezclaude
andcommitted
Demonstrate first-class PHP configuration (Codeception PR #6946)
Replace the YAML Codeception config with the new PHP config format and link codeception/codeception to the php_config branch (PR #6946) so the GlobalConfig / SuiteConfig builders are available. - Delete codeception.yml and tests/Functional.suite.yml - Add codeception.php and tests/Functional.suite.php (equivalent config) - composer: add a VCS repo for Codeception/Codeception and require "dev-php_config as 5.3.x-dev"; refresh composer.lock accordingly - CI: also trigger on the 8.1-php-config branch Illustrative / draft only: do not merge until PR #6946 lands, after which the composer link must revert to a stable codeception/codeception release. Verified: config:validate loads the .php config, and the Functional suite passes (138 tests, 258 assertions) against the php_config core. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 56fde86 commit 706e21f

7 files changed

Lines changed: 160 additions & 132 deletions

File tree

.github/workflows/symfony.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
branches:
66
- '8.1'
7+
- '8.1-php-config'
78
pull_request:
89
branches:
910
- '8.1'
11+
- '8.1-php-config'
1012

1113
env:
1214
APP_ENV: test

codeception.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Codeception\Config\GlobalConfig;
6+
use Codeception\Extension\RunFailed;
7+
8+
return GlobalConfig::create()
9+
->namespace('App\Tests')
10+
->supportNamespace('Support')
11+
->paths(
12+
tests: 'tests',
13+
output: 'tests/_output',
14+
data: 'tests/Support/Data',
15+
support: 'tests/Support',
16+
envs: 'tests/_envs',
17+
)
18+
->actorSuffix('Tester')
19+
->extension(RunFailed::class)
20+
->params('.env', '.env.test')
21+
->settings(shuffle: true, colors: true, reportUselessTests: true);

codeception.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
"description": "Codeception Symfony Module tests",
44
"type": "project",
55
"license": "MIT",
6+
"repositories": [
7+
{
8+
"type": "vcs",
9+
"url": "https://github.com/Codeception/Codeception.git"
10+
}
11+
],
612
"authors": [
713
{
814
"name": "Gustavo Nieves",
@@ -31,7 +37,7 @@
3137
"symfony/yaml": "8.1.*"
3238
},
3339
"require-dev": {
34-
"codeception/codeception": "^5.3",
40+
"codeception/codeception": "dev-php_config as 5.3.x-dev",
3541
"codeception/module-asserts": "^3.2",
3642
"codeception/module-doctrine": "^3.3",
3743
"codeception/module-symfony": "^3.8 | *@dev",

0 commit comments

Comments
 (0)