-
Notifications
You must be signed in to change notification settings - Fork 0
[EPIC] Symfony full migration #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0ca80e to
30a5356
Compare
This was referenced Jan 24, 2022
Merged
Merged
Merged
Merged
This was referenced Feb 13, 2022
Merged
Merged
Merged
Merged
Merged
This was referenced Feb 20, 2022
Merged
Merged
8852551 to
4e8f798
Compare
This was referenced Feb 23, 2022
Merged
4f8348b to
d34e41d
Compare
Merged
5be9b3b to
766ade1
Compare
This was referenced Mar 31, 2022
Merged
…th base and game layouts
… Mercure with broadcast upon transaction adding and removal
…cure.kalaxia.local domain
…rade Mercure dependencies
…omponent in recycling building
…atform Remove all previous assets and migrate all frontend to Symfony UX, Tailwind and Stimulus
Implement game portal with registration and login
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request migrates the legacy codebase to the Symfony framework.
It also replaces the game request workflow.
Components
The game had a lot of homemade components as it did not use Composer or any kind of vendors at its creation.
Originally the game had its own server socket to listen incoming requests. It had all the engine services loaded, some of them were very stateful and contained different data per session. Now we are going to use a classical PHP-FPM architecture in production, and a PHP webserver in dev environment.
Homemade components are to be replaced with Symfony components :
Templates
A lot of logic were contained in the PHP view files, that are now being migrated to Twig. Some of this logic have been temporarly been moved to Twig Extensions but will finally be placed in dedicated services.
A
TwigEventSubscriberhas been implemented to set some custom global variables in the templates :current_basecontains the current player orbital baseincoming_commanderscontains the list of the current base incoming commandersoutgoing_commanderscontains the list of the current base outgoing commanderscurrent_dock1_ship_queuescontains the list of light ships being crafted at the current basecurrent_dock2_ship_queuescontains the list of heavy ships being crafted at the current basenext_base_idcontains the ID of the player's next orbital basecurrent_base_namecontains the name of the current basecurrent_base_imagecontains the picture of the current basecurrent_playercontains the current playercurrent_player_faction_idcontains the faction id of the current playerconversations_countcontains the count of private messages received by the current playercurrent_player_notificationscontains the list of the unread notifications of the current playerThe biggest part of these variables are used in the main game layout. Some of them may be cleaned but are there to temporarly represent the legacy logic while migrating.
Argument Resolvers
Two argument resolvers have been introduced thanks to Symfony to inject session-related entities in the Controller :
OrbitalBase: contains the current player basePlayer: contains the current playerAs a player may have several bases, a later rework would be to implement an
OrbitalBaseStackto keep in store the player bases and inject it properly.Hexagonal Architecture
The domain were separated in different packages, named after greek gods. We are currently reorganizing these packages with the hexagonal architecture principles. Moving all the existing stuff to the right place will be done in time, but for now a few interfaces were created to factorize domain concepts, like
QueueableInterfaceandTravellerInterface.Remaining tasks
Linked Pull Requests