Code Monkey home page Code Monkey logo

bilemo's Introduction

BileMo SensioLabsInsight

This web app works with Symfony v3.3.9 and uses Twig v2.0 (Required php 7.0).

I built this project as part of my php learning with OpenClassRooms.

The goal of this project was to create a products provider with API REST for a mobile phone e-commerce.

Getting Started

Prerequisites

  • Local server environment or live server
  • PHP v7.0
  • MySQL v5.0 or higher

Installing

  • Clone or download the repository and put files into your environment

  • Install all the project dependencies with composer install

  • Modify the database parameters if you need to in app/config/parameters.yml

parameters:
    database_host: your_host
    database_port: your_port
    database_name: your_database_name
    database_user: your_database_username
    database_password: your_database_password
  • Install the database structure and datas with php bin/console app:load-datas

  • You can access the API documentation at: yourdomain.domain/doc

  • Enjoy

Built With

Authors

Nathan MEYER

See also ismail1432 on whom I can rely on a lot on this project.

bilemo's People

Watchers

James Cloos avatar Nathan Meyer avatar

bilemo's Issues

[Insight] Commented code should not be committed - in web/app.php, line 17

in web/app.php, line 17

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    $kernel->loadClassCache();
}
//$kernel = new AppCache($kernel);

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

Posted from SensioLabsInsight

[Insight] The response should be redirected after posting data to an action - in src/…/Controller/UserController.php, line 107

in src/AppBundle/Controller/UserController.php, line 107

The createAction() method allows POST requests, but does not redirect the user. It is a common best practice to call a redirect after a POST action.

     *      }
     *
     *
     * )
     */
    public function createAction(User $user, ConstraintViolationList $violations)
    {
        if (count($violations)) {
            $message = 'The JSON sent contains invalid data. Here are the errors you need to correct: ';
            foreach ($violations as $violation) {
                $message .= sprintf("Field %s: %s ", $violation->getPropertyPath(), $violation->getMessage());

Posted from SensioLabsInsight

[Insight] Commented code should not be committed - in web/app.php, line 14

in web/app.php, line 14

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

$kernel = new AppKernel('prod', false);
if (PHP_VERSION_ID < 70000) {
    $kernel->loadClassCache();
}
//$kernel = new AppCache($kernel);

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);

Posted from SensioLabsInsight

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.