square/connect
Retired Square Connect PHP SDK (EOL 2020-06-10). No longer receives updates or fixes. Migrate to the new Square PHP SDK: require square/square, update namespaces from SquareConnect\ to Square, and adjust client/response handling per docs.
square/connect package is archived and deprecated (EOL since 2020-06-10), replaced by square/square. This eliminates any architectural justification for its use in new or production systems./v2/refunds, /v2/payments), but the modern square/square SDK supports v3+ APIs with improved features (e.g., better error handling, method chaining, and SDK-generated models).square/square SDK is more actively maintained and Laravel-friendly.square/square is well-documented (as shown in the README), but the effort to backport changes would outweigh benefits.square/square is feasible.| Risk Area | Assessment |
|---|---|
| Security | Uses OAuth 2.0 (via OAuthApi), but the deprecated renewToken/revokeToken endpoints pose risks. The newer SDK handles OAuth more robustly. |
| Breaking Changes | Square’s API evolves; this package locks teams into v2, missing v3+ features (e.g., improved webhooks, better error models). |
| Vendor Lock-in | No abstraction layer—direct API calls mean tight coupling to Square’s deprecated endpoints. |
| Performance | No benchmarks, but older PHP SDKs may lag behind modern alternatives. |
| Compliance | PCI compliance for payments relies on Square’s current SDK. Using a deprecated SDK could introduce audit risks. |
square/square?
square/square with a clear timeline.renewToken endpoint is risky.square/square achieve the same goals with less risk?square/square with Laravel’s HTTP client or a custom facade for consistency.use SquareConnect\* imports and replace them with use Square\*./v2/payments) and update to v3+ if needed.composer require square/square:^5.0.0
composer remove square/connect
SquareConnect\Configuration with SquareClient initialization.CreatePaymentRequest instead of raw arrays).$apiResponse->isSuccess() → $response->isError()).SquareClient to verify API calls.square/square.| Component | Compatibility Notes |
|---|---|
| Laravel | Works, but requires manual integration (no built-in Laravel support). |
| PHP Version | Supports PHP 7.x (as per badge), but no PHP 8.x guarantees. |
| Square API | Locks to v2 endpoints (e.g., /v2/refunds). Newer APIs (v3+) require square/square. |
| OAuth | Supports OAuth 2.0, but deprecated endpoints (renewToken, revokeToken) are risky. |
square/connect with square/square in non-critical modules.square/connect usage.square/connect from composer.json.square/square metrics.1.12.0) to avoid unintended updates.square/square’s community-driven support (GitHub issues, Slack).square/square.| Scenario | Impact | Mitigation Strategy |
|---|---|---|
| Square API deprecation | v2 endpoints may shut down without notice. | Migrate to square/square before Square enforces v3-only policies. |
| OAuth token expiration | Deprecated renewToken may fail silently. |
Use square/square’s refresh token flow instead. |
| Payment processing failures | Undocumented errors in v2 API may break critical flows. | Implement retry logic with exponential backoff. |
| Composer removal | Package may be unpublished from Packagist. | Cache the package locally or fork it as a last resort. |
| Laravel version conflicts | PHP 8.x features may break compatibility. | Use a Dockerized PHP 7.4 environment for legacy support. |
How can I help you explore Laravel packages today?