Fix error reporting / session / migration issues#1946
Merged
Conversation
Prior to this change, the error reporter would always try to write feedback info to the session, even if there was no session because the script is running from a CLI context. This change skips that step if no session is available. Prior to this change, the migrations would fail because a class hierarchy was introduced, which required the namespace to be registered in the autoloader. This change updates the autoloader and repairs the migrations without changing the migration namespace so migrations are not executed again on existing environments. Prior to this change, a migration relied on a deprecated DBAL method to check if an index existed. This change rewrites the check using only non-deprecated checks.
kayjoosten
approved these changes
Mar 18, 2026
Prior to this change, the hasSession() would already trigger a session_start from within Symfony Framework. The session_start left in there was not needed and confusing. This change leaves session handling to the framework and does not try to start the session again manually.
MKodde
reviewed
Mar 19, 2026
Comment on lines
+426
to
+434
| public function hasSession(): bool | ||
| { | ||
| try { | ||
| $this->getSession(); | ||
| return true; | ||
| } catch (SessionNotFoundException) { | ||
| return false; | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
This solution should work no problem; assuming we autostart sessions and have them enabled in the first place. Which is a requirement for EB to work..
You might have gone the isCli route, which might have been somewhat 'safer' in the department of change of behavior. I'm fine with this too, just wanted to chime in on this.
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
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.
Prior to this change, the error reporter would always try to write feedback info to the session, even if there was no session because the script is running from a CLI context. This change skips that step if no session is available.
Prior to this change, the migrations would fail because a class hierarchy was introduced, which required the namespace to be registered in the autoloader. This change updates the autoloader and repairs the migrations without changing the migration namespace so migrations are not executed again on existing environments.
Prior to this change, a migration relied on a deprecated DBAL method to check if an index existed. This change rewrites the check using only non-deprecated checks.