Project

General

Profile

Actions

Bug #100945

closed

vendor/bin/setup fails if port is not passed as option and host is "localhost"

Added by Sybille Peters 11 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2023-06-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Stabilization Sprint

Description

Port has a default of 3306, so this shouldn't fail.

Reproduce

on DB (with existing user "typo3"):

mysql> create database t3intro12 CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> grant all on t3intro12.* to `typo3`@`localhost`;

composer create-project typo3/cms-base-distribution:^12 t3intro12
cd t3intro12
./vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro12 --username=typo3 --password='a34234Sfb8GHf!' --project-name=t3intro12 --force -n

For TYPO3 13, it needs some additional parameters, e.g.

vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro13 --username=typo3 --password='mypasswd...' --project-name=t3intro13 --force -n  --admin-username=system --admin-user-password='mypasswd' --admin-email="myemail@mydomain" 

Result

In SetupCommand.php line 428:

  Please use a port in the range between 1 and 65535.  

Expected result

Port is default 3306, so port is set correctly and this should not fail, see

./vendor/bin/typo3 setup -h

Versions

  • reproduced with TYPO3 12 base distribution
  • reproduced with TYPO3 13 base distribution

Workaround

Pass the port explicitly, e.g.

./vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro12 --username=typo3 --password='a34234Sfb8GHf!' --project-name=t3intro12 --force -n --port=3306

Actions #1

Updated by Sybille Peters 11 months ago

  • Description updated (diff)
Actions #2

Updated by Benni Mack 11 months ago

  • Sprint Focus set to Stabilization Sprint
Actions #3

Updated by Johannes Nielsen 11 months ago

host, dbname and username also have default values. Would it make sense to make those optional, too?

Actions #4

Updated by Sybille Peters 11 months ago

host, dbname and username also have default values. Would it make sense to make those optional, too?

It depends if the default values actually make sense and you would use them in most cases.

  • host: default is "db".
  • dbname: default is "db"
  • username: default is "db"

I don't think the defaults "db" are good defaults here but that is just my opinion. I would not make them optional.

Actions #5

Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #6

Updated by Johannes Nielsen 11 months ago

Sybille Peters wrote in #note-4:

host, dbname and username also have default values. Would it make sense to make those optional, too?

It depends if the default values actually make sense and you would use them in most cases.

  • host: default is "db".
  • dbname: default is "db"
  • username: default is "db"

I don't think the defaults "db" are good defaults here but that is just my opinion. I would not make them optional.

Those are the default values which ddev uses. I agree that whether these make sense depends heavily on the individual project/setup and that it probably does not make sense to make them optional.

Actions #7

Updated by Gerrit Code Review 11 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #8

Updated by Gerrit Code Review 11 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #9

Updated by Gerrit Code Review 11 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #10

Updated by Gerrit Code Review 11 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #11

Updated by Gerrit Code Review 10 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257

Actions #12

Updated by Gerrit Code Review 10 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79831

Actions #13

Updated by Anonymous 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF