Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bc58e1e
[#19] - aligning php-cs-fixer rules with the other phalcon projects
niden Jul 15, 2026
811b5f2
[#19] - applying ordered_class_elements across the codebase
niden Jul 15, 2026
92ee0b2
[#19] - adding TALON_REST_URL to Settings
niden Jul 15, 2026
210ddfb
[#19] - adding symfony/http-client and symfony/mime
niden Jul 15, 2026
771caee
[#19] - adding Http\HttpCode with standard reason phrases
niden Jul 15, 2026
8705d01
[#19] - adding Http\JsonSubset for recursive JSON fragment matching
niden Jul 15, 2026
5da0bcb
[#19] - adding Http\JsonType type-map validation
niden Jul 15, 2026
bee7f74
[#19] - adding RestTrait with HTTP transport, headers and verbs
niden Jul 15, 2026
28a1e4a
[#19] - adding RestAssertionsTrait and AbstractRestTestCase
niden Jul 15, 2026
596d6e4
[#19] - updating changelog
niden Jul 15, 2026
339549c
[#19] - hardening the REST tests against mutation
niden Jul 15, 2026
05e3873
[#19] - updating infection config for the REST surface
niden Jul 15, 2026
013402b
[#19] - removing infection from composer until the PHP floor moves
niden Jul 15, 2026
faa47a3
[#19] - adjusting changelog
niden Jul 15, 2026
2802af1
[#19] - fixing the RestTrait findings from review
niden Jul 15, 2026
08ee9f0
[#19] - fixing the JSON matching findings from review
niden Jul 15, 2026
a1b70c5
[#19] - updating changelog for the review fixes
niden Jul 15, 2026
688375d
[#19] - splitting JsonType::match to cut its cognitive complexity
niden Jul 15, 2026
536724b
[#19] - closing the mutation gaps in the REST tests
niden Jul 15, 2026
0bba074
phpcs
niden Jul 15, 2026
b53de38
phpcs
niden Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ jobs:
- name: Tests with coverage
run: composer test-coverage

- name: Mutation testing
run: composer test-mutation
# Mutation testing is not run here: infection pulls thecodingmachine/safe
# at dev-master, which autoloads 80 files eagerly on every request and
# emits deprecations on PHP 8.5. The package is out of composer.json until
# the minimum PHP version moves past 8.1; resources/infection.json5 stays,
# so `composer require --dev infection/infection` restores the setup.

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2.0
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [0.8.0](https://github.com/phalcon/talon/releases/tag/v0.8.0) (2026-07-15)

### Changed

### Added

- Added a REST/JSON test surface: `Phalcon\Talon\Traits\RestTrait` (the full verb set, file uploads, request headers that persist across requests, `amBearerAuthenticated()`/`amHttpAuthenticated()`, redirect control, and response grabbers), `Phalcon\Talon\Traits\RestAssertionsTrait` (status, range, body, header, and JSON assertions), and `Phalcon\Talon\PHPUnit\AbstractRestTestCase` which composes both. A raw string body is sent as `application/json` unless a content type is set, and `$files` takes either a plain path or the `$_FILES` shape. [#19](https://github.com/phalcon/talon/issues/19)
- Added `Phalcon\Talon\Http\HttpCode` - HTTP status constants plus `getDescription()`, which returns the `404 (Not Found)` form. It is deliberately an independent implementation of the standard reason phrases rather than a lookup into the application under test, so that asserting an application's emitted status string against it actually asserts something. [#19](https://github.com/phalcon/talon/issues/19)
- Added `Phalcon\Talon\Http\JsonType` - validates a decoded JSON document against a map of type expectations (`string`, `integer`, `float`, `boolean`, `array`, `null`, the `:date` filter, `|` unions, and nested maps). Keys absent from the map are ignored, so a map can describe just the part of an envelope a test cares about. `float` accepts a whole number too - JSON has a single number type, so `{"price": 10}` decodes to an int and a strict `float` would fail on every round value. `integer` stays strict. [#19](https://github.com/phalcon/talon/issues/19)
- Added `Phalcon\Talon\Http\JsonSubset` - recursive subset matching, so a fragment can be asserted against a full document. Keys and list elements present in the response but absent from the expectation are ignored, and list elements match in any order. An empty expected list is the exception: `['data' => []]` asserts that `data` is empty rather than matching any `data` at all. [#19](https://github.com/phalcon/talon/issues/19)
- Added `TALON_REST_URL` to `Settings::fromEnv()`, readable via `Settings::get('rest_url')` and defaulting to `http://127.0.0.1:8080`. It is resolved through Talon's shared `Settings` and so is the same for every test in a run; `RestTrait::useRestBaseUrl()` points an individual test somewhere else. [#19](https://github.com/phalcon/talon/issues/19)

### Fixed

### Removed

## [0.7.0](https://github.com/phalcon/talon/releases/tag/v0.7.0) (2026-07-10)

### Changed
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
"php": "^8.1",
"phalcon/cli-options-parser": "^2.0",
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/dom-crawler": "^6.4 || ^7.0"
"symfony/dom-crawler": "^6.4 || ^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"symfony/mime": "^6.4 || ^7.0"
},
"require-dev": {
"ext-pdo": "*",
"ext-sqlite3": "*",
"friendsofphp/php-cs-fixer": "^3",
"infection/infection": "^0.29.9",
"pds/composer-script-names": "^1",
"pds/skeleton": "^1",
"phalcon/phalcon": "^6.0@alpha",
Expand Down
Loading