Skip to content

Generate quality-checked PHP SDKs - #1824

Merged
ChiragAgg5k merged 2 commits into
appwrite:mainfrom
ChiragAgg5k:feat/php-formatter-clean
Aug 21, 2026
Merged

Generate quality-checked PHP SDKs#1824
ChiragAgg5k merged 2 commits into
appwrite:mainfrom
ChiragAgg5k:feat/php-formatter-clean

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

  • make PHP templates emit Pint-clean, strictly typed generated source and tests
  • add generated SDK configuration for Pint (PSR-12), PHPStan level 5, and Rector
  • add Composer scripts and CI validation for all three quality checks
  • enable the full Pint and Rector rulesets without ignored rules or baselines
  • improve generated request handling and multipart upload typing while retaining completed-upload resume behavior

This completes the PHP target in #1813.

Validation

rm -rf examples/php
php example.php php server
cd examples/php
composer install
composer lint
composer analyse -- --no-progress
composer refactor
composer audit
composer test

Results:

  • Pint: passed
  • PHPStan level 5: no errors
  • Rector dry-run: no changes
  • Composer audit: no advisories
  • PHPUnit: 787 tests, 962 assertions

Generator checks:

composer lint-twig
composer refactor:check
git diff --check

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes generated PHP SDKs strictly typed and compatible with Pint, PHPStan, and Rector while updating multipart upload and response handling.

  • Adds generated quality-tool configurations, Composer scripts, and CI checks.
  • Modernizes PHP source and test templates for strict typing and PSR-12 formatting.
  • Updates chunked-upload resume, authentication, progress, and completion handling.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
templates/php/base/requests/file.twig Updates generated multipart and concurrent chunk-upload handling; the previously reported unconditional bearer-key access is now correctly guarded by the same condition that generates the client property.
templates/php/src/Client.php.twig Adds strict typing and quality-tool-compatible transport code while keeping bearer-specific properties conditional.
templates/php/src/Services/Service.php.twig Generates strictly typed service methods and conditionally imports file support.
src/SDK/Language/PHP.php Registers generated quality configurations and updates PHP test-fixture rendering conventions.
templates/php/composer.json.twig Adds generated SDK development dependencies and scripts for linting, analysis, and refactoring.
.github/workflows/validation.yml Runs the new PHP quality checks during generated SDK validation.

Reviews (4): Last reviewed commit: "fix: guard multipart bearer authorizatio..." | Re-trigger Greptile

Comment thread templates/php/base/requests/file.twig
@ChiragAgg5k
ChiragAgg5k force-pushed the feat/php-formatter-clean branch from a54a390 to afadeab Compare August 21, 2026 11:41
@ChiragAgg5k
ChiragAgg5k force-pushed the feat/php-formatter-clean branch from b9714b3 to 79f6340 Compare August 21, 2026 12:05
@ChiragAgg5k
ChiragAgg5k merged commit 09b025f into appwrite:main Aug 21, 2026
58 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat/php-formatter-clean branch August 21, 2026 13:03
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