macopedia / magmi-m2

Magmi GitHub, see branch magento2 for a version compatible with Magento 2
113 stars 53 forks source link

Extracting DB credentials from env.php #63

Closed bertod closed 4 years ago

bertod commented 4 years ago

Reading database dbname, username and password, like you can do in Magento 1 from local.xml

envscraping.zip

bertod commented 4 years ago

I rewrited it using env.php inclusion instead of using regex

bertod commented 4 years ago

Regarding format your code (PSR-2), I'm sorry about it, I think that is a problem from my editor, because the code isn't actually formatted bad as you can see on git. I will fix it

fsw commented 4 years ago

Hi @bertod , Thanks for contributing, I have merged your category attribute SQL fix as a separate merge to keep things clean. Please try to keep one issue per merge request.

bertod commented 4 years ago

@tmotyl regarding the database port, I found on the DevDocs (https://devdocs.magento.com/guides/v2.2/install-gde/install/cli/install-cli-install.html) that you can include the port in the host. So I think it will work.

UPDATE. I tried on a Magento2 installation: I changed the DB port and the env.php reports the hostname plus port number as written in the dev docs.

tmotyl commented 4 years ago

please resolve the conflict, other changes looks good

bertod commented 4 years ago

Conflicts are fixed