Skip to content

fix: detect imported Symfony cookie calls - #45

Open
Jonas Elfering (keulinho) wants to merge 1 commit into
mainfrom
codex/fix-symfony-cookie-rule-test
Open

fix: detect imported Symfony cookie calls#45
Jonas Elfering (keulinho) wants to merge 1 commit into
mainfrom
codex/fix-symfony-cookie-rule-test

Conversation

@keulinho

Copy link
Copy Markdown

Summary

Restore detection of insecure Symfony Cookie construction and factory calls that use an imported Cookie class.

Details

  • use PHPStan's inferred expression type to identify Symfony Cookie instances
  • retain the existing handling for named arguments and fluent withSecure calls
  • make the existing cookie-rule test pass with all ten intended violations

Validation

  • vendor/bin/phpunit tests/Rule/ForbidInsecureSymfonyCookieRuleTest.php
  • php -d memory_limit=1G vendor/bin/phpunit
  • php -d memory_limit=1G vendor/bin/phpstan analyse src/Rule/ForbidInsecureSymfonyCookieRule.php --no-progress
  • PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff

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