monteiro / PR-40856

Symfony serializer groups not refreshing in development mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample debug app

Related to PR : symfony/symfony#40856

git clone git@github.com:monteiro/PR-40856.git
composer install
// up the postgresql db
docker-compose up
bin/console doctrine:migrations:migrate
bin/console doctrine:fixtures:load
symfony serve
  • execute curl localhost:8000/api/contacts
    • you should see a JSON of contacts with 2 fields
  • go to src/Entity/Contact.php and add or remove @Groups("contacts_get") on the entity properties, save
  • execute curl localhost:8080/api/contacts
    • ⚠️ you should see no changes
  • execute cache:clear
  • execute curl localhost:8080/api/contacts
    • ⚠️ you should see changes

Notes: This issue was reported by @jhice

About

Symfony serializer groups not refreshing in development mode


Languages

Language:PHP 85.2%Language:Shell 12.4%Language:Twig 2.5%