Skip to content

Conversation

@truckee
Copy link

@truckee truckee commented Jan 7, 2026

Updated database connection URLs from '127.0.0.1' to 'localhost' for consistency.

Q A
Fixed tickets fixes #issuenum
Related PRs sulu/sulu#prnum
License MIT

What's in this PR?

Use "localhost" instead of "127.0.0.1" for universal (IPV6 or IPV4) URLs.

Why?

Systems only recognizing IPV6 will not accept IPV4 URLs.

Updated database connection URLs from '127.0.0.1' to 'localhost' for consistency.
.. code:: bash
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7
DATABASE_URL=mysql://db_user:db_password@localhost:3306/db_name?serverVersion=5.7
Copy link
Member

Choose a reason for hiding this comment

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

We use Symfony defaults here always, which we stay with if you want to change this from 127.0.0.1 to localhost you need create a Pull Request to Symfony and check with the Symfony / Doctrine Team why they use 127.0.0.1 instead of localhost.

Check: https://github.com/symfony/recipes/blob/db54e87e75fbb63c8ab84def24d7cf4632fd5dcc/doctrine/doctrine-bundle/2.13/manifest.json#L14-L16


.. code-block:: bash
php -S localhost:8000 -t public/ config/router.php
Copy link
Member

Choose a reason for hiding this comment

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

Would more go with 127.0.0.1 here instead of localhost.

Copy link
Author

Choose a reason for hiding this comment

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

A modification is indicated because Windows 11 provides a naked hosts file. That file at a minimum needs to contain:

127.0.0.1 localhost
::1 localhost

Shall I take this to Symfony or redo my pull request here?

@alexander-schranz
Copy link
Member

PS: bugfixes in docs need target lowest supported version which is currently 2.6.

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.

2 participants