Skip to content

Conversation

@gessyken
Copy link
Contributor

Resolves all PHP 8.1+ deprecation warnings and fixes Application bootstrap issues.

Changes:

  • Add explicit nullable types in helpers.php (17 functions)
  • Add explicit nullable types in Tokenize class
  • Fix session_set_cookie_params() type casting
  • Add __call() and send() methods to Application class
  • Code quality improvements for readability

Files: 5 modified, +61/-39 lines
Tested: PHP 8.1, 8.2, 8.3, 8.4
Breaking changes: None

…ibility

Remove deprecation warnings by explicitly declaring nullable parameter types.
Fixed functions:
- db(), table(), get_last_insert_id(), db_table()
- create_csrf_token(), csrf_time_is_expired()
- redirect(), email(), session()
- cache(), app_hash(), bow_hash(), app_trans()
- url(), cookie(), e()

Also fixed DiskFilesystemService::store() parameter type declaration.
Remove deprecation warnings in Tokenize class:
- csrf() parameter $time
- csrfExpired() parameter $time
Fix session_set_cookie_params() type error by properly casting:
- domain: can be null
- secure: must be bool
- httponly: must be bool
Simplify method_exists check by inverting logic.
More readable and follows early return pattern.
@papac papac merged commit d1cdcaa into bowphp:5.x Dec 18, 2025
1 check passed
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