Skip to content

Conversation

@rixafy
Copy link
Contributor

@rixafy rixafy commented Dec 16, 2025

Since support for annotations was removed, it was calling non-existent method.

  • bug fix
  • BC break? yes

Since support for annotations was removed, it was calling non-existent method
Copilot AI review requested due to automatic review settings December 16, 2025 06:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where AccessPolicy was attempting to call a non-existent method ComponentReflection::parseAnnotation() after annotation support was removed from the framework. The change removes the obsolete annotation check for @crossOrigin, as this functionality has been fully replaced by the modern PHP 8 attribute-based approach using #[Requires(sameOrigin: false)].

  • Removes call to non-existent parseAnnotation() method that would cause runtime errors
  • Maintains identical security behavior through existing attribute-based check on line 70
  • Aligns code with framework's migration from annotations to PHP 8 attributes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dg
Copy link
Member

dg commented Dec 19, 2025

Thanks

@dg dg merged commit 5860574 into nette:master Dec 19, 2025
8 of 15 checks passed
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.

2 participants