* test: add failing tests for StateManager lock and cleanup bugs
- 8 test methods covering BUG-01 (missing LOCK_UN), BUG-02 (callback exception leaks), REF-01 (no try-finally)
- Baseline tests for startRun/completeRun functionality
- Lock verification helper using LOCK_EX|LOCK_NB non-blocking check
- 2 structural tests fail against current code (RED phase), proving missing try-finally
* fix: add try-finally to StateManager for proper lock and handle cleanup
- BUG-01: flock(LOCK_UN) now always called before fclose via finally block
- BUG-02: $completeRun() callback moved after lock release, exceptions cannot leak locks
- REF-01: both startRun() and completeRun() use try-finally pattern
- Added fopen return value checks for defensive error handling
- All 110 tests pass with no regressions
* fix: replace loose equality, fix method typo, and resolve variable shadowing in API clients
- Replace all == with === in ApiClientV1 (4 locations) and ApiClientV2 (1 location)
- Rename covertToModel to convertToModel in ApiClientV2
- Fix $step variable shadowing in convertStep() foreach using $childStep
* refactor: extract shared host URL resolution into protected methods
- Add resolveApiHost() and resolveAppUrl() protected methods to ApiClientV1
- Refactor ApiClientV1 constructor to use new methods instead of inline logic
- Refactor ApiClientV2 constructor to use inherited resolveApiHost('v2')
- Eliminates duplicated URL construction logic between V1 and V2 clients
* refactor: add isDebug() to LoggerInterface and guard json_encode in debug calls
- Add isDebug() method to LoggerInterface contract
- Implement isDebug() in Logger returning the debug flag
- Guard 3 json_encode calls in ApiClientV1 and ApiClientV2 with isDebug() check
- Prevents expensive serialization when debug mode is inactive
* refactor: extract tryApiCall helper and cache attachment file sizes
- Add tryApiCall() private method for standardized error handling across 9 methods
- Refactor isProjectExist, getEnvironment, completeTestRun, isTestRunExist,
getConfigurationGroups, createConfigurationGroup, createConfigurationItem,
runUpdateExternalIssue, enablePublicReport to use tryApiCall()
- Keep createTestRun and uploadAttachment with their own error handling
- Modify filterValidAttachments to return {attachments, sizes} structure
- Modify splitIntoBatches to accept pre-computed sizes, eliminating redundant
filesize()/strlen() calls
* test: add failing tests for external link order independence and dead method removal
- Add testExternalLinkFromEnvBothVarsSet to verify external link assembly regardless of env var order
- Add testExternalLinkFromEnvOnlyTypeNoUrl to verify partial env vars produce no link
- Add testNoResetConfigurationCacheMethod to verify dead method is removed from TestOpsReporter
* test: add failing tests for null reporter fallback and scoped error_reporting
- Test runFallbackReporter with null primary reporter (BUG-03)
- Test fallback activation with null primary (BUG-03)
- Test error_reporting not globally suppressed (REF-04)
* fix: resolve external link env var order bug, tighten permissions, rename method, remove dead code
- Fix ConfigLoader external link assembly to be order-independent via post-loop finalizeExternalLink()
- Change mkdir permissions from 0777 to 0755 in Logger and FileReporter
- Rename prepare_report_folder to prepareReportFolder in FileReporter
- Remove unused resetConfigurationCache method from TestOpsReporter
* fix: null-safe fallback reporter and scoped error_reporting suppression
- Add null check for primary reporter in runFallbackReporter() before
calling getResults(), preventing NPE when reporter is null (BUG-03)
- Remove global error_reporting(E_ALL & ~E_DEPRECATED) at file scope
- Add save/restore error_reporting pattern with finally blocks to all
five methods: startRun, completeRun, addResult, sendResults,
runFallbackReporter (REF-04)
- Fallback reporter activates regardless of primary reporter state
* fix: use Step structured API for status mapping and remove deprecated setAccessible calls
Step status mapping was writing to dynamic properties via BaseModel::__set
instead of Step->execution, so mapped statuses were never sent to the API.
Also remove setAccessible() calls deprecated since PHP 8.1.
* chore: bump version to 2.1.15 and update dependencies
Update guzzlehttp/psr7 2.8.0→2.9.0, qase-api-client 1.1.5→1.1.8,
qase-api-v2-client 1.1.2→1.1.3.
* fix: make error_reporting test check source code instead of runtime state
The test checked runtime error_reporting() level which depends on the CI
environment's php.ini, making it fail when E_DEPRECATED is already
suppressed. Now checks that CoreReporter.php has no file-scope
error_reporting() call.
* fix: restore setAccessible() calls required for PHP 8.0 compatibility
setAccessible() is a no-op since PHP 8.1 but still required on PHP 8.0
to access private properties/methods via Reflection.