Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation / README] Simplified installation guide #8664

Merged
merged 1 commit into from
Sep 21, 2017
Merged

[Documentation / README] Simplified installation guide #8664

merged 1 commit into from
Sep 21, 2017

Conversation

bpolaszek
Copy link
Contributor

@bpolaszek bpolaszek commented Sep 13, 2017

Q A
Bug fix? no
New feature? no
BC breaks? no
Related tickets none
License MIT

Hello there,

I suggest some minor changes in the README. When looking at the installation part, I found some confusing points:

  • The guide assumes you've never used composer but you're comfortable with yarn (it will probably be the contrary)
  • There's no "production" point.
  • The code block looks big, and some may think the installation is tedious at first glance
  • There are too many links to my eyes :)

I also changed the order of the sentences in the intro to conclude with "Enjoy being an eCommerce Developer again!" instead of having it somewhere in the middle.

What's your opinion?

@bpolaszek bpolaszek changed the title Simplified installation guide [Documentation / README] Simplified installation guide Sep 13, 2017
@Zales0123 Zales0123 added the Documentation Documentation related issues and PRs - requests, fixes, proposals. label Sep 14, 2017
@pamil pamil changed the base branch from master to 1.0 September 15, 2017 07:57
@pamil pamil added this to the 1.0 milestone Sep 15, 2017
@bpolaszek
Copy link
Contributor Author

bpolaszek commented Sep 15, 2017

Please don't merge now, the production part is not ok.
Since we're on stable version we should prove that setting up a shop on production with Sylius is a piece of cake.

But actually when running

php bin/console sylius:install --env prod

The installer loads sample data in the database. I don't think this is relevant in a production environment.
So far I did not see an option in the sylius:install command that allows skipping fixtures.
There's also no intuitive & safe way to destroy sample data in a single command line.

In my opinion:

  • We should start by resolving Database name is hardcoded in config_dev.yml #8476 - I think it's very confusing to force the developer to have 2 different databases.
  • We need:
    • Either an option to skip fixtures when calling sylius:install, either by detecting --env prod or by a new InputOption like --skip-fixtures (I prefer the 2nd option)
    • Or a new command sylius:remove:sample-data that will truncate all relevant tables.

To my eyes, the simplest installation guide for a newcomer should look like this:


Installation

You need composer to install PHP packages and yarn to install JS packages.

$ composer create-project sylius/sylius-standard my-sylius-shop && cd my-sylius-shop
$ php bin/console sylius:install
$ yarn install && yarn run gulp
$ php bin/console server:start

Alternatively, you can use Vagrant for your initial setup.

Then:

  • Open http://localhost:8000/ in your web browser to enjoy your Sylius shop in a development environment.
  • Open http://localhost:8000/admin to discover your new back-office.

To help you get familiar with the Sylius interface, we populated some sample products, taxons, orders, etc.

Production

When you're ready to go live, reset your database:

php bin/console sylius:remove:sample-data

Then please refer to Symfony's documentation to properly setup URL rewriting to web/app.php on your Apache/Nginx web server.


What's your opinion? I think the installation part should target experienced Symfony developers as well as people that have very basic knowledge of PHP and want to quickly setup a fully functionnal online shop.

@CoderMaggie
Copy link
Member

@bpolaszek When running sylius:install the installer asks you whether to install sample data or not. So you can resign from it :)

@bpolaszek
Copy link
Contributor Author

Hi @CoderMaggie,

F*ck, you're right!

Loading sample data for environment dev.
Warning! This action will erase your database.
Continue? (y/N)

I read too fast, actually, I thought I did not have a choice. When I read this, I understood that if I choose N, the whole installation process stops, so I systematically chose Y or Ctrl+C. My bad.

@bpolaszek
Copy link
Contributor Author

Now, it's good for review :)

$ wget http://getcomposer.org/composer.phar
$ php composer.phar create-project sylius/sylius-standard project
$ cd project
$ composer create-project sylius/sylius-standard my-sylius-shop && cd my-sylius-shop
Copy link
Member

Choose a reason for hiding this comment

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

MySyliusShop?
Or even just acme?

@lchrusciel lchrusciel merged commit 35938db into Sylius:1.0 Sep 21, 2017
@lchrusciel
Copy link
Member

Thanks Ben!

@vzenix
Copy link

vzenix commented Sep 25, 2017

Hi.

I try do composer create-project sylius/sylius-standard my-sylius-shop It's work, but in bin folder doesn't create "console" and when next time i try do cd my-sylius-shop php bin/console sylius:install it fails.

PHP version: 7.0.10
System: Windows 7

sylius_problem

@pamil
Copy link
Contributor

pamil commented Sep 25, 2017

@vzenix can you also include the output of composer create-project?

@pamil
Copy link
Contributor

pamil commented Sep 25, 2017

Btw. make sure you're using PHP 7.1+

@bpolaszek bpolaszek deleted the readme-improvements branch September 25, 2017 12:06
@vzenix
Copy link

vzenix commented Sep 25, 2017

@pamil Thanks. i change PHP 7.0 to php 7.1 and it's work, next error is an overflow of memory (PHP memory_limit=128M), i change to -1 for testing and the install works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation related issues and PRs - requests, fixes, proposals.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants