2.5 release - Linting and tests#85
Merged
Merged
Conversation
0d4f57f to
dd5587f
Compare
- Introduced `setPaymentMethodToBancontact` method in `PaymentBluemRequest.php`. - Updated `PaymentsContext.php` to include `PAYMENT_METHOD_BANCONTACT`. - Added `isBancontact` method to check if the current payment method is Bancontact. - Updated `README.md` to document the new Bancontact support.
…cies - Updated the minimum PHP version requirement to 8.3 in composer.json and README.md. - Bumped rector/rector to version 2.4 and updated related dependencies. - Removed deprecated Magento coding standard dependency from composer.json. - Updated README to reflect the new versioning and requirements. This change ensures compatibility with PHP 8.3 and prepares the library for future enhancements.
… consistency - Introduced strict types declaration across multiple files to enforce type safety. - Updated variable declarations to use `readonly` where applicable for better immutability. - Enhanced string formatting using `sprintf` for improved readability and consistency. - Refined exception handling to use more descriptive variable names. This change aims to enhance code quality and maintainability, ensuring a more robust implementation.
…ng across multiple files This commit addresses inconsistencies in code formatting, including spacing around operators and method definitions. The changes enhance code readability and maintainability. No functional changes were made. Testing was conducted to ensure that all existing functionalities remain intact after the formatting adjustments.
- Upgraded PHPUnit to version 11 in CI configuration. - Set PHP platform version to 8.3 in composer.json for compatibility. - Adjusted dependencies in composer.lock to align with new requirements.
…ecks This commit introduces a new Makefile target for setting up Git hooks and adds a pre-commit script that runs unit tests when PHP files are modified. This ensures that tests are executed automatically, improving code quality and reducing the chances of introducing errors.
…operties Refactor properties in various BluemResponse classes to nullable types to enhance type safety and prevent potential null reference errors. This change ensures that the application can handle cases where these properties may not be set, improving overall robustness.
… environment and return status values - Introduced a new Constants class to centralize environment and expected return status definitions. - Updated BluemConfigurationValidator to utilize these constants, enhancing code readability and maintainability.
…tes for Unit, Integration, and Acceptance tests - Adjusted phpunit.xml to define distinct test suites for better organization and clarity. - Enhanced Makefile to facilitate running all tests in one command, improving developer efficiency.
Added CurlHttpTransport class to handle HTTP requests using cURL, implementing the HttpTransportInterface. This allows for better encapsulation of HTTP transport logic and error handling. Updated Bluem class to utilize the new transport mechanism, enhancing the overall architecture. Testing was conducted to ensure that the new transport layer correctly handles responses and errors.
Extracted the FakeHttpTransport class from BluemTest.php into its own file, enhancing code organization and maintainability. This change allows for easier testing and potential reuse of the FakeHttpTransport in other test cases.
…ructor type hints - Introduced a new property `paymentBrandID` in `BluemConfiguration` for better configuration management. - Updated constructor type hints in `BluemRequest` and `PaymentStatusBluemRequest` to use `BluemConfiguration` explicitly. - Enhanced error handling in `BluemResponse` and `BluemConfigurationValidator` for improved clarity. This change aims to streamline the configuration process and enhance type safety across the Bluem integration.
Modified constructors in multiple BluemRequest classes to allow for BluemConfiguration or stdClass as the configuration parameter. This change enhances flexibility in handling different configuration types across requests.
- Changed copyright year from 2023 to 2026 in all relevant files. - Refactored constructor syntax in several classes to use single-line format. - Adjusted array formatting for consistency across various files. - Cleaned up unnecessary line breaks and improved readability in multiple classes.
… and certificate management - Enhanced the validate method to streamline error handling and improve readability. - Introduced separate methods to determine the appropriate certificate based on the current date and environment. - Updated logic for determining the filename of the certificate to accommodate future certificates. - Improved exception handling for loading keys and verifying signatures.
…and consistency - Adjusted visibility and formatting of properties and methods in the Bluem class. - Enhanced error handling in the BluemConfigurationValidator for missing environment configuration. - Updated the Webhook class for consistent property visibility and formatting. - Added unit test for creating a PaymentBluemRequest in BluemPaymentsTest. - Refactored BluemTest to use createStub instead of createMock for better test clarity. - Removed unused helper methods in BluemTest to streamline the test class.
631930e to
744fb94
Compare
…ependencies from composer.json
…for response properties
…les in phpcs.xml and phpcs.xml.dist
DaanRijpkema
approved these changes
Jun 29, 2026
DaanRijpkema
left a comment
Collaborator
There was a problem hiding this comment.
Environment constants
Duplicated in report identity
Remove unnecessary commented code
One more sweep should be enough
…ith copyright, added more constants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.