- While I edit an entity which gets updated on the server by another user, I get a notification and a button for updating the page I'm looking at.
- While I am looking at an entity list, if a an entity on the page gets updated on the server by another user, I get a notification, a button for updating the page I'm looking at and the outdated entity gets highlighted.
This demo application has been generated from the MicroSymfony template.
- Docker
- PHP 8.1
- The Symfony CLI
Your 8000 and 50943 ports must be free for the Symfony CLI web server and Mercure.
composer install
make start
Then open http://127.0.0.1:8000/
To reinitialize the database you can run:
make db-init
To check the PHPUnit tests, you can run:
make test
make stop
You can also manually emit notifications in your application check out AppController:
$topic = $this->adminUrlGenerator->setController(Article::class)
->unsetAllExcept('crudControllerFqcn')->generateUrl();
$update = new Update(
$topic,
(string) json_encode(['id' => 1]),
);
Of course you should rely on an actual article instance in this case.
- php-cs-fixer with the Symfony ruleset and PHP strict types
- PHPStan at maximum level
- A simple Makefile