Coder Social home page Coder Social logo

Comments (9)

jaxwilko avatar jaxwilko commented on July 26, 2024 2

My personal view would be to remove the script in composer.json and either people can run cp .env.example .env or ./artisan winter:env

from winter.

LukeTowers avatar LukeTowers commented on July 26, 2024

@WebProviderNGO this is very odd, our default DB config hasn't changed in years: https://github.com/wintercms/winter/blob/develop/config/database.php#L35

@mjauvin are you able to replicate this?

from winter.

mjauvin avatar mjauvin commented on July 26, 2024

@LukeTowers the difference is that you added the following to core composer.json:

    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],

So even when selecting SQLite as the database engine during the install, the database gets taken from the .env file (which contains mysql as the database).

from winter.

mjauvin avatar mjauvin commented on July 26, 2024

@LukeTowers I think we should remove/comment out the DB_* settings in the .env.example file, that would resolve the issue.

from winter.

bennothommo avatar bennothommo commented on July 26, 2024

I would probably prefer removing that script entirely. While I am all for environment files, Winter works fine without them, and some people prefer the config files.

I know this was added in #939 to support Laravel Sail, but I would imagine one could simply copy .env.example to .env as part of the bootstrap process and still achieve the same effect.

from winter.

mjauvin avatar mjauvin commented on July 26, 2024

@bennothommo what does the web-installer do with the config? Does it fill-in the dotEnv file or the config/database.php one ?

from winter.

bennothommo avatar bennothommo commented on July 26, 2024

@mjauvin it fills out the config currently, using the Laravel Config Writer that @jaxwilko wrote.

from winter.

mjauvin avatar mjauvin commented on July 26, 2024

@bennothommo So I assume you remove the script entry in the composer.json ?

from winter.

LukeTowers avatar LukeTowers commented on July 26, 2024

@marvindurot Will this break your workflow if we remove the command from the composer script but leave the example file?

from winter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.