Skip to content

Conversation

@CodeWithKyrian
Copy link
Owner

Summary

This PR implements comprehensive code quality improvements using PHPStan and PHP CS Fixer, while simultaneously fixing critical bugs in the runtime argument passing system that were exposed through static analysis.

Motivation

The main motivation was to improve the codebase quality and catch subtle bugs that were not apparent during normal testing but were caught by PHPStan's static analysis.

What Changed

  • Added PHPStan static analysis at level 8
  • Added PHP CS Fixer for automated code style
  • Fixed FunctionValue::call method to use proper callable invocation
  • Corrected ObjectValue built-in functions to accept $args array pattern
  • Fixed method name inconsistencies (evaluateAsBool → asBool) across RuntimeValue classes
  • Added proper type validation in built-in functions
  • Established consistent argument passing pattern for RuntimeValue methods
  • Made RuntimeValue implement Stringable interface
  • Added GitHub Actions QA workflow for code quality checks
  • Added PHP 8.4 support to CI/CD pipeline

Breaking Changes

None - All fixes maintain backward compatibility while improving type safety and consistency.

- Add PHPStan static analysis and PHP CS Fixer for code quality
- Fix FunctionValue::call method to use proper callable invocation
- Correct ObjectValue built-in functions to accept $args array pattern
- Fix method name inconsistencies (evaluateAsBool → asBool) across RuntimeValue classes
- Add proper type validation and error handling in built-in functions
- Establish consistent argument passing pattern for all RuntimeValue methods
- Add GitHub Actions workflow for automated code quality checks
- Support PHP 8.4 in CI/CD pipeline
@CodeWithKyrian CodeWithKyrian merged commit 17e6121 into main Oct 27, 2025
5 checks passed
@CodeWithKyrian CodeWithKyrian deleted the feat/code-quality-and-bug-fixes branch October 27, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants