Máté Kocsis
0e43594305
Revert "Add explicit type declarations to class constants (PHP 8.3+) ( #215 )"
...
This reverts commit c65199393a .
2026-03-04 08:43:09 +01:00
Louis-Arnaud
c65199393a
Add explicit type declarations to class constants (PHP 8.3+) ( #215 )
...
### Motivation
- Enhances type safety and static analysis.
- Makes code intent clearer.
- Prepares PhD for PHP 8.4 compatibility and future strictness.
### Scope
- Added types such as `int`, `string`, `bool`, or `array` to class constants.
- Example:
Before:
`public const FORMAT_HTML = 1;`
`public const NAME = 'PhD';`
After:
`public const int FORMAT_HTML = 1;`
`public const string NAME = 'PhD';`
### Impact
- ✅ No runtime behavior change.
- ✅ Fully backward compatible with PHP 8.3+.
- ⚙️ Code clarity and safety improvement only.
- Updated `composer.json` to indicate PHP 8.3 requirement
- Removed 8.1 and 8.2 CI pipelines
### References
- [PHP 8.3: Typed class constants RFC](https://wiki.php.net/rfc/typed_class_constants )
- [PHP manual: Class constants](https://www.php.net/manual/en/language.oop5.constants.php )
---------
Co-authored-by: lacatoire <louis-arnaud.catoire@external.drivalia.com >
2026-02-05 20:45:10 +00:00
haszi
b80ae36dba
Change property names to camel case
2024-12-29 19:58:10 +00:00
haszi
b8e817b6ff
Replace method calls with property access
2024-12-29 19:58:10 +00:00
haszi
15284136ff
Separate regular PhD output from error handling ( #176 )
...
- Move error handling code into a class and remove PhD message output handling from it.
- Introduce a new class to handle PhD message output.
- Make the implicit dependency on the output functionality of classes explicit.
- Update PEAR package.xml.
- Fix tests.
- Use proper variadic parameters
- Use class constants
- Use first-class callable syntax
---------
Co-authored-by: haszi <haszika80@gmail.com >
2024-11-10 17:57:05 +00:00