sulu / sulu-standard

This repository is not longer the recommended way to start a sulu project. Use:
https://github.com/sulu/skeleton
MIT License
614 stars 106 forks source link

Run in dev environment #831

Open bdecarne opened 7 years ago

bdecarne commented 7 years ago
Q A
Bug? yes
New Feature? no
Sulu Version latest
Browser Version -

Actual Behavior

When i launch the server using :

php bin/console server:start

the default environment is prod, wich is not very convenient for development.

WebServerBundle is using app.php as entrypoint, because there is no app_dev.php.

Expected Behavior

Builtin server must use dev environment

Steps to Reproduce

composer create-project sulu/sulu-minimal my-project -n
bin/adminconsole sulu:build dev
php bin/console server:start

Possible Solutions

create a app_dev.php, like symfony distribution :

<?php

define('SYMFONY_ENV', 'dev');
require_once __DIR__ . '/app.php';
danrot commented 7 years ago

We've already been discussing this. We don't know exactly which solution we will take yet. We have not discussed yet if we only want that behavior for the php internal webserver, or if dev should be the general default.

In the mean time you can use SYMFONY_ENV=dev bin/console server:start to start in dev mode.

/cc @trickreich @chirimoya

bdecarne commented 7 years ago

We've already been discussing this

Sorry, i did'nt find it during my search

As a Symfony developer, it is to me the expected behavior for the php internal webserver, not for general default.

danrot commented 7 years ago

The issue just came up this week and we discussed it in person, not on github :-)