{"id":13411453,"url":"https://github.com/thenlabs/stratus-bundle","last_synced_at":"2026-02-26T05:30:02.301Z","repository":{"id":57068329,"uuid":"331747429","full_name":"thenlabs/stratus-bundle","owner":"thenlabs","description":"Extends Symfony to the full stack development with integration of StratusPHP.","archived":false,"fork":false,"pushed_at":"2021-07-24T19:40:03.000Z","size":239,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T06:12:55.284Z","etag":null,"topics":["ajax","ajax-request","event-driven","promote","reactive","symfony","symfony-bundle","ui","ux","ux-ui"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thenlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-21T20:32:05.000Z","updated_at":"2023-05-12T17:02:20.000Z","dependencies_parsed_at":"2022-08-24T14:54:11.130Z","dependency_job_id":null,"html_url":"https://github.com/thenlabs/stratus-bundle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenlabs%2Fstratus-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenlabs%2Fstratus-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenlabs%2Fstratus-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenlabs%2Fstratus-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thenlabs","download_url":"https://codeload.github.com/thenlabs/stratus-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243754092,"owners_count":20342542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","ajax-request","event-driven","promote","reactive","symfony","symfony-bundle","ui","ux","ux-ui"],"created_at":"2024-07-30T20:01:13.807Z","updated_at":"2025-10-29T04:18:38.968Z","avatar_url":"https://github.com/thenlabs.png","language":"PHP","funding_links":[],"categories":["Web Development"],"sub_categories":["PHP"],"readme":"\n# ThenLabsStratusBundle\n\nExtends Symfony to the full stack development with integration of [StratusPHP][stratus-php-repo].\n\n**Notice: Like [StratusPHP][stratus-php-repo], this project is also in development and should not be used in a real project yet.**\n\n## Installation.\n\nInstall StratusPHP specifying the development version.\n\n    $ composer require thenlabs/stratus-php 1.0.x-dev\n\nInstall the maker bundle in case it isn't.\n\n    $ composer require symfony/maker-bundle --dev\n\nInstall this bundle:\n\n    $ composer require thenlabs/stratus-bundle dev-master\n\n## Usage.\n\n### Creating reactive pages.\n\nOnce the installation has finished we can create the application pages that will bring the integration with StratusPHP.\n\nIn order to create a new page run the next command:\n\n    $ php bin/console make:stratus-page main\n\nIn this case, \"main\" refers to the page name.\n\n![](1.png)\n\nAs you can see, they was created three files, a template, a controller, and a class. You can review these files and edit it according to the project needs.\n\nIn the controller class you can fix the page route. By default will be like the page name, `/main` in this case.\n\nThe template file is empty by default but you should edit it with the page view.\n\nIn this example we will develop the [Example 2](https://thenlabs.org/es/doc/stratus-php/master/examples/2/example.html) of the StratusPHP docs.\n\n```twig\n{# templates/main-stratus-page.html.twig #}\n\n{% extends 'base.html.twig' %}\n\n{% block body %}\n    \u003cinput s-element=\"myInput\" type=\"text\"\u003e\n    \u003clabel s-element=\"myLabel\"\u003e\u003c/label\u003e\n    \u003cbutton s-element=\"myButton\" s-element-event-click=\"clickOnTheButton\"\u003eGreet\u003c/button\u003e\n{% endblock %}\n```\n\n\u003eIt’s very important highligh the `s-element` attribute and his value on key elements of the page view.\n\n```php\n\u003c?php\n// src/StratusPage/MainStratusPage.php\n\nnamespace App\\StratusPage;\n\nuse ThenLabs\\Bundle\\StratusBundle\\Annotation\\StratusPage;\nuse ThenLabs\\Bundle\\StratusBundle\\AbstractPage;\n\n/**\n * @StratusPage(template=\"main-stratus-page.html.twig\")\n */\nclass MainStratusPage extends AbstractPage\n{\n    public function clickOnTheButton(): void\n    {\n        $this-\u003emyLabel-\u003etextContent = 'Hello ' . $this-\u003emyInput-\u003evalue;\n    }\n}\n```\n\nWe want to highligh that `textContent` and `value` they are properties managed in real time on the browser. Theorically, it's possible manage any property type and react to any event.\n\nIf you want to know all the StratusPHP posibilities, you can see the [examples](https://thenlabs.org/es/doc/stratus-php/master/examples/index.html) in his documentation.\n\n#### Testing results.\n\n    $ symfony server:start\n\nNow, if we access to the `http://localhost:8000/main/` we will obtains the next results.\n\n![](2.gif)\n\n### Getting services inside page classes.\n\n```php\n\u003c?php\n// src/StratusPage/MainStratusPage.php\n\n// ...\n\n/**\n * @StratusPage(template=\"main-stratus-page.html.twig\")\n */\nclass MainStratusPage extends AbstractPage\n{\n    public function clickOnTheButton(): void\n    {\n        // getting the doctrine service.\n        $doctrine = $this-\u003econtroller-\u003eget('doctrine');\n\n        // ...\n    }\n}\n```\n\n## Pending features.\n\n1. Enable the support of autowiring services inside the page classes.\n\n## Known issues.\n\nOne of the most representative features of StratusPHP is its ability to send messages by streaming to the browser as can be seen in [example 3](https://thenlabs.org/es/doc/stratus-php/master/examples/3/example.html). It is very important to keep in mind that this feature causes problems when it is being developed with the Symfony Local Web Server (`symfony server: start`). Instead, we recommend using PHP's internal server which you can run with the command `php -S localhost: 8000 -t public /`.\n\n[stratus-php-repo]: https://github.com/thenlabs/stratus-php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenlabs%2Fstratus-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenlabs%2Fstratus-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenlabs%2Fstratus-bundle/lists"}