Skip to content

Guard REQUESTS_SILENCE_PSR0_DEPRECATIONS define in Deprecated.php#420

Open
SAY-5 wants to merge 1 commit into
razorpay:masterfrom
SAY-5:guard-requests-psr0-deprecations-constant
Open

Guard REQUESTS_SILENCE_PSR0_DEPRECATIONS define in Deprecated.php#420
SAY-5 wants to merge 1 commit into
razorpay:masterfrom
SAY-5:guard-requests-psr0-deprecations-constant

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 18, 2026

Copy link
Copy Markdown

Deprecated.php defines REQUESTS_SILENCE_PSR0_DEPRECATIONS unconditionally. When the host application or another package (for example WordPress core, which ships this constant in its bundled Requests library) has already defined it before this file loads, PHP raises Fatal error: Constant REQUESTS_SILENCE_PSR0_DEPRECATIONS already defined. Razorpay.php in this same package already wraps the define in an if (!defined(...)) guard, so this just brings Deprecated.php in line with it. Fixes #415.

Note :- Please follow the below points while attaching test cases document link below:

- If label Tested is added then test cases document URL is mandatory.

- Link added should be a valid URL and accessible throughout the org.

- If the branch name contains hotfix / revert by default the BVT workflow check will pass.

Test Case Document URL
Please paste test case document link here....

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.

Deprecated.php: unconditional define() causes fatal error when REQUESTS_SILENCE_PSR0_DEPRECATIONS is already defined

1 participant