What's Changed
This pull request includes several updates to modernize the codebase, improve type safety, and enhance testing. Key changes involve updating PHP versions, adding Psalm for static analysis, renaming and adding new run configurations, and refactoring code to use stricter type declarations.
Updates to Testing and CI:
.github/workflows/phpunit.yml
: Added PHP 8.3 to the test matrix and removed older versions (7.4, 8.0). Also added Psalm static analysis to the CI pipeline. [1] [2].travis.yml
: Removed the Travis CI configuration in favor of GitHub Actions.
Configuration and Dependency Updates:
composer.json
: Updated PHP requirement to>=8.1
, updated dependencies to their latest versions, and addedvimeo/psalm
for static analysis. [1] [2]psalm.xml
: Added a new configuration file for Psalm static analysis.
Code Refactoring for Type Safety:
src/AbstractRequester.php
: Refactored methods to use stricter type declarations and updated exception handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]src/ApiRequester.php
: Updated to use stricter type declarations and improved exception handling. [1] [2] [3]
Documentation and Configuration:
.idea/runConfigurations/Main.xml
: Renamed fromTest_Project.xml
and updated configuration..idea/runConfigurations/Psalm.xml
: Added a new run configuration for Psalm.
These changes collectively enhance the project's compatibility with modern PHP versions, improve code quality through static analysis, and ensure better type safety across the codebase.
Full Changelog: 4.9.2...5.0.0