Skip to content

@remotion/lambda-php: Fix PHP 8.2 dynamic property deprecation for storageClass #5555

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

Merged
merged 3 commits into from
Aug 2, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 2, 2025

Fixes the PHP 8.2+ deprecation warning:

Creation of dynamic property Remotion\LambdaPhp\RenderParams::$storageClass is deprecated

The issue occurred because the $storageClass property was being used throughout the RenderParams class (constructor assignment, getter/setter methods, serialization) but was never properly declared as a class property. In PHP 8.2+, creating dynamic properties triggers a deprecation warning.

Changes Made

  • Added missing protected $storageClass = null; property declaration to the RenderParams class
  • Created comprehensive test RenderParamsStorageClassTest.php to verify the fix and prevent regression

Before

// PHP 8.2+ would show:
// Deprecation: Creation of dynamic property Remotion\LambdaPhp\RenderParams::$storageClass is deprecated
$params = new RenderParams(storageClass: 'STANDARD_IA');

After

// No deprecation warnings
$params = new RenderParams(storageClass: 'STANDARD_IA');
echo $params->getStorageClass(); // 'STANDARD_IA'

Verification

All tests pass without deprecation warnings:

  • 3 tests, 11 assertions
  • Existing functionality unchanged
  • New test validates storageClass behavior across constructor, setter, and serialization

This is a minimal, surgical fix that maintains full backward compatibility while resolving PHP 8.2+ compatibility issues.

Fixes #5542.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

vercel bot commented Aug 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2025 11:22am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
remotion ⬜️ Skipped (Inspect) Aug 2, 2025 11:22am

@vercel vercel bot temporarily deployed to Preview – remotion August 2, 2025 10:49 Inactive
@Copilot Copilot AI changed the title [WIP] PHP 8.2 issue - Creation of dynamic property Remotion\LambdaPhp\RenderParams::$storageClass is deprecated @remotion/lambda-php: Fix PHP 8.2 dynamic property deprecation for storageClass Aug 2, 2025
@Copilot Copilot AI requested a review from JonnyBurger August 2, 2025 10:50
Copilot finished work on behalf of JonnyBurger August 2, 2025 10:50
@vercel vercel bot temporarily deployed to Preview – remotion August 2, 2025 11:19 Inactive
@JonnyBurger JonnyBurger marked this pull request as ready for review August 2, 2025 11:19
@JonnyBurger JonnyBurger enabled auto-merge August 2, 2025 11:19
@JonnyBurger JonnyBurger merged commit 86e924b into main Aug 2, 2025
13 checks passed
@JonnyBurger JonnyBurger deleted the copilot/fix-5542 branch August 2, 2025 11:29
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.

PHP 8.2 issue - Creation of dynamic property Remotion\LambdaPhp\RenderParams::$storageClass is deprecated
2 participants