Skip to content

Fix error reporting / session / migration issues#1946

Merged
johanib merged 2 commits intomainfrom
feature/fix-install-issues
Mar 18, 2026
Merged

Fix error reporting / session / migration issues#1946
johanib merged 2 commits intomainfrom
feature/fix-install-issues

Conversation

@johanib
Copy link
Contributor

@johanib johanib commented Mar 18, 2026

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.

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.
@johanib johanib requested a review from kayjoosten March 18, 2026 07:44
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.
@johanib johanib merged commit 0bcf392 into main Mar 18, 2026
2 checks passed
@johanib johanib deleted the feature/fix-install-issues branch March 18, 2026 08:20
Comment on lines +426 to +434
public function hasSession(): bool
{
try {
$this->getSession();
return true;
} catch (SessionNotFoundException) {
return false;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants