Skip to content

DEV-123965 general improvements#98

Open
tomerparizer wants to merge 8 commits into
masterfrom
DEV-123965_general-improvements
Open

DEV-123965 general improvements#98
tomerparizer wants to merge 8 commits into
masterfrom
DEV-123965_general-improvements

Conversation

@tomerparizer

Copy link
Copy Markdown
Contributor

Summery

Boost the repo with more standardization

  1. Update readme
  2. added code analysis using PHPStan
  3. added code linter using PHP Code Sniffer

tomerparizer and others added 7 commits June 15, 2026 16:25
Introduce a coding-standard and static-analysis stack for the SDK:

- phpcs (PSR-12) + PHPCompatibility targeting PHP 5.5+ via phpcs.xml.dist
- phpstan level 5 with a baseline for pre-existing findings
- composer scripts (lint/fix/analyse/check) and a CI workflow

Fix the PHP 5.5 incompatibilities the tooling surfaced in Notification.php:
replace the null-coalescing operators (PHP 7.0) and provide hash_equals
(PHP 5.6) via symfony/polyfill-php56, plus a self-contained fallback
polyfill loaded by the bundled autoloader for non-Composer consumers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop .github/workflows/ci.yml; CI is handled elsewhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DavidRibeiroRiskified DavidRibeiroRiskified changed the title Dev 123965 general improvements DEV-123965 general improvements Jun 17, 2026
Comment thread README.md

Migrating to API Version 2
--------------------------
For full API details, see the [Riskified API reference](https://apiref.riskified.com).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link is outdated, use https://developers.riskified.com

Comment thread README.md
Initialize the SDK once with your shop domain and authentication token (both available in the Riskified
web app under **Settings**), then build and submit an order.

```php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just link to the example file or have an example section that points to the sample folder no?

Comment thread README.md
* `/api/cancel` - served by `$transport->cancelOrder()`

Refer to the online [documentation](http://apiref.riskified.com) for more details.
Refer to the online [documentation](https://apiref.riskified.com) for more details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update ref link

Comment thread phpcs.xml.dist
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="is_null" value="null"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread phpstan-baseline.neon

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note: this file gets deleted in #98

Comment thread README.md
=================
# Riskified PHP SDK

version: 1.12.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the v number in Readme

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.

3 participants