-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
V2 Release #11
Merged
Merged
V2 Release #11
Conversation
This file contains 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
Bumps the composer group with 2 updates: [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) and [guzzlehttp/psr7](https://github.com/guzzle/psr7). Updates `guzzlehttp/guzzle` from 7.3.0 to 7.4.5 - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/7.9/CHANGELOG.md) - [Commits](guzzle/guzzle@7.3.0...7.4.5) Updates `guzzlehttp/psr7` from 2.0.0 to 2.7.0 - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/2.7/CHANGELOG.md) - [Commits](guzzle/psr7@2.0.0...2.7.0) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-type: direct:production dependency-group: composer - dependency-name: guzzlehttp/psr7 dependency-type: indirect dependency-group: composer ... Signed-off-by: dependabot[bot] <support@github.com>
…-1967ddcb51 Bump the composer group with 2 updates
* WIP: Refactor Termii library to a more modular and maintainable architecture This commit significantly refactors the Termii PHP library by removing outdated files and dependencies. It introduces new resource structures, including MessagingResource, SenderIdResource, and CampaignResource, for improved organization and functionality. The Termii class has been updated to integrate these resources, offering a more modular and maintainable architecture for interacting with Termii's API. Signed-off-by: Douglas Okolaa <okolaadouglas@gmail.com> * Refactor requests into endpoints The requests from various parts of the application have been consolidated and refactored into endpoint classes for greater clarity and organization. This change improves maintainability by centralizing request logic, aligning with a more streamlined architecture. Existing requests have been removed or replaced with their endpoint equivalents to ensure consistency across the codebase. Signed-off-by: Douglas Okolaa <okolaadouglas@gmail.com> * Refactor and optimize Termii Connector and Resources The Termii class now uses a singleton pattern for TermiiConnector initialization, simplifying resource management and avoiding redundant connections. In CampaignResource, the phoneBook method is optimized by implementing lazy initialization for PhonebookResource, ensuring efficient resource use. Signed-off-by: Douglas Okolaa <okolaadouglas@gmail.com> * docs(README): Enhance library description and usage instructions * fix: update type declarations and add phpstan Corrected return types in factory methods to match class names, replaced a dangling static instance with direct instantiation, and removed a debug statement. Additionally, a phpstan configuration file was added to enhance code quality checks, and the phpstan dependency was included in composer.json. These changes aim to improve code reliability and maintainability. * refactor(endpoints): update endpoints and class properties with test coverage Modified endpoints in Campaign and adjusted class properties for flexibility. The changes improve data handling, such as making certain fields optional, adding new multipart data structure, and refining API key handling in requests. Updated endpoint paths as part of a broader API alignment effort. * feat(data): add ConvertsDtoToRequestArray interface implementation Introduced the `ConvertsDtoToRequestArray` interface and implemented it across relevant DTO classes for enhanced request array conversion. This improves data handling consistency and streamlines request building processes. * docs(readme): update examples and improve code snippets Enhanced the README with updated code examples for message sending, campaigns, phonebook, and contact management. Improved clarity by restructuring snippets for better usability and understanding. These changes align with the current TermiiPHP SDK functionality. * feat(token): implement endpoints for Token API Added support for generating, sending, and verifying OTPs via voice call, email, in-app, and SMS channels. Introduced relevant resources, endpoints, and tests to ensure functionality and improve API integration. This update enhances the library's utility for handling OTP workflows. * docs(readme): update examples and improve code snippets Enhanced the README with updated code examples for message sending, campaigns, phonebook, and contact management. Improved clarity by restructuring snippets for better usability and understanding. These changes align with the current TermiiPHP SDK functionality. * feat(code-style): introduce PHP-CS-Fixer for consistent formatting Added `.php-cs-fixer.php` configuration to enforce a consistent code style across the project. Aligned indentation, spacing, and method declaration formatting using PHP-CS-Fixer rules. BREAKING CHANGE: Codebase formatting changes can result in merge conflicts or affect existing pull requests. * feat(debugging): add troubleshooting support * feat(insight): add Insight API endpoints and related tests Introduced Insight API endpoints including balance retrieval, phone number status, DND check, and message history. Added corresponding test cases, fixtures, and updated resources for seamless integration. * feat(core): implement Termii RequestException Introduce a new custom `RequestException` to replace Saloon's base exceptions. This ensures consistent exception handling across the codebase and improves modularity by centralizing exception management. * `ci(tests): add GitHub Actions workflow for PHP tests` * fix(tests): update file path in CampaignApiTest * feat(ci): add PHP CS fixer workflow for code linting * fix(workflows): update workflow name to php-cs * `chore(github): add funding configuration` --------- Signed-off-by: Douglas Okolaa <okolaadouglas@gmail.com>
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.
Refactor Termii library to a more modular and maintainable architecture
Refactor of the Termii PHP library by removing outdated files and dependencies. introduced new resource structures, including Resources, Endpoints, DTO for improved organization and functionality. The Termii class has been updated to integrate these resources, offering a more modular and maintainable architecture for interacting with Termii's API.
Highlights of Changes in
v2
1. New Features
Insight API Support
Added new endpoints for the Insight API, including:
Accompanied by corresponding tests and resources for smoother usage.
Token API for OTP Workflows
Implemented endpoints for generating, sending, and verifying OTPs across multiple channels including:
Enhanced with test cases and documentation updates.
Custom
RequestException
ClassIntroduced a new
TermiiRequestException
to replace Saloon's base exceptions. This improves exception handling by centralizing and streamlining error management.Troubleshooting Support
Added initial debugging and troubleshooting capabilities to help developers resolve integration issues quickly.
2. Codebase Refactoring and Optimization
Termii
class to follow the Singleton Pattern for managingTermiiConnector
initialization, reducing redundancy and improving resource handling.ConvertsDtoToRequestArray
interface, implemented across relevant DTOs for consistency in request array conversion.3. Coding Standards and Quality
4. Testing Improvements
CampaignApiTest
.ci(tests)
), ensuring better CI/CD coverage.5. Documentation Updates
Messaging
,Campaigns
,Phonebook
,Contact Management
, etc.).Breaking Changes