Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PHP 8.x #52

Merged
merged 4 commits into from
Oct 29, 2024
Merged

Upgrade to PHP 8.x #52

merged 4 commits into from
Oct 29, 2024

Conversation

byjg
Copy link
Owner

@byjg byjg commented Sep 14, 2024

This pull request introduces several changes to enhance the codebase's type safety, improve dependency management, and add static analysis capabilities. The most significant changes include adding Psalm for static analysis, updating dependencies, and refining type hints across various database classes.

Static Analysis and Dependency Management:

  • Added Psalm for static analysis:
    • Updated .github/workflows/phpunit.yml to include Psalm (./vendor/bin/psalm).
    • Added Psalm configuration file psalm.xml.
    • Created a run configuration for Psalm in .idea/runConfigurations/Psalm.xml.
    • Updated composer.json to include vimeo/psalm as a development dependency and added autoload-dev section.

Type Hinting and Code Refinement:

  • Enhanced type hinting and method signatures:

    • Refined type hints for properties and methods in src/Database/AbstractDatabase.php, including changing method signatures to specify return types and parameter types. [1] [2] [3]
    • Updated src/Database/DatabaseInterface.php to include type hints for method parameters and return types.
  • Consistent exception handling and import statements:

    • Standardized exception handling and import statements across various database classes (DblibDatabase, MySqlDatabase, PgsqlDatabase, SqliteDatabase). [1] [2] [3] [4]

Breaking changes

  • Added enum MigrationStatus, instead of const Migration::VERSION_*

@byjg byjg merged commit f0f9f87 into master Oct 29, 2024
4 checks 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.

1 participant