Code Monkey home page Code Monkey logo

php-challenge's Introduction

Coding challenge

Introduction

This app is about an API handling the products, customers and subscriptions of an online shop.

How to run

docker-compose up -d

Note: the included docker-compose.yml is supposed to run on linux, if you're using a different host os, you will need to adapt it:

php-challenge:
    build: .
    volumes:
        - .:/var/www/php-challenge
    ports:
        - 9080:9080
    # remove if you're using a mac or windows
    extra_hosts:    
        - "host.docker.internal:host-gateway"

You will also need to adapt xdebug.ini

max_execution_time=-1

; Uncomment to enable this extension.
zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_host=host.docker.internal ; change to docker.for.mac.host.internal if its not working
xdebug.remote_port=9002
xdebug.idekey=PHPSTORM

The database should have been initialized automatically and its tables should hold fixture data.

If you want to init it again you can either remove the database container docker-compose rm db or within the php container using:

bash-4.4# php app/console doctrine:database:drop
bash-4.4# php app/console doctrine:database:create
bash-4.4# php app/console doctrine:schema:create
bash-4.4# php app/console doctrine:fixtures:load

Site is available at: http://localhost:9080, xdebug is listening at port 9002, you find the API calls available at http://localhost:9080/api/docs

To run the tests enter the container and run:

bin/simple-phpunit -c app/phpunit.xml src/AppBundle

The tests will create a code coverage which is available in the build folder.

Tasks

You find the tasks and their description here

You should also read through the project description for a small introduction what the test project is about.

After you finished please document your decisions. Your also free to add extra documentation on how to run the project in case you make changes to its setup.

What are we looking for

  • Ability to spot code errors
  • How do you improve code
  • If you can dive into an old codebase
  • What is your rationale to change code
  • How you document previously undocumented project.
  • How you add features without breaking existing functionalities

php-challenge's People

Contributors

markusseifert avatar torrid 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.