Code Monkey home page Code Monkey logo

sulu-workshop-symfony-live-berlin-2019's Introduction

Symfony Live Berlin 2019 Workshop

This repository contains the project structure for the Sulu workshop at the Symfony Live Berlin 2019. The repository builds upon the sulu/skeleton repository and adds some project specific libraries such as Bootstrap or Symfony Encore.

The assignments of the workshop are located in the assignments folder.

Requirements

  • PHP 7.2 or higher
  • Relational Database like MySQL, MariaDB or PostgreSQL

Optional requirements

Getting started

Setting up your database

If you choose to run your services with docker you can startup your database by executing the following command:

docker-compose up

If you prefer to use your local database you can configure your credentials in a .env.local file in the root directory of the project:

DATABASE_URL=mysql://DB_USER:[email protected]:3306/DB_NAME

Installing the dependencies

Use composer to install the dependencies of the project:

composer install --optimize-autoloader

Initialize the Sulu Database

Run the following command to initialize the database that will be used by Sulu:

bin/console sulu:build dev --destroy

Run Webserver

You can startup the built-in PHP web-server with:

bin/console server:run

If you have the SYMFONY CLI Tools installed and want to increase your performace you can also use the following command to startup the SYMFONY webserver:

symfony server:start

Development

The project setup in the repository includes several development tools that help you to improve the quality of your code

PHPUnit

The project already contains some unit tests and functional tests. They can be executed with the following commands:

# create and update test database
bin/adminconsole doctrine:database:create -e test
bin/adminconsole doctrine:schema:update --force -e test

# execute all test cases
composer test

You can can pass additional phpunit arguments by appending -- <arguments> to the composer test command.

composer test -- --stop-on-fail

PHP-CS-Fixer

To keep your code consistent you can automatically reformat your code with the following command:

composer php-cs-fix

PHPStan

PHPStan helps you to catch bugs before they actually occur by statically analyzing your code. Use following command to run it:

composer phpstan

sulu-workshop-symfony-live-berlin-2019's People

Contributors

alexander-schranz avatar chirimoya avatar niklasnatter avatar wachterjohannes avatar

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.