Commit 38fab3fe authored by Stéphane Codazzi's avatar Stéphane Codazzi

Add phpcs, gitlabci

parent e7c84df2
# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=fds4fds45qq445fdswgfse
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
###< symfony/framework-bundle ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=*
###< nelmio/cors-bundle ###
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=mysql://gitlabci_ktb:ILQ8k99TBTs2sRbv@192.168.2.20:3306/gitlabci_ktb
###< doctrine/doctrine-bundle ###
......@@ -6,6 +6,7 @@
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.1",
"squizlabs/php_codesniffer": "*",
"symfony/console": "^4.1",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.1",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "77f629d08dc842aec9717ee0f9094f8c",
"content-hash": "d3a92bdd94170ff4e21a975954573abb",
"packages": [
{
"name": "api-platform/api-pack",
......@@ -1897,6 +1897,57 @@
],
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.3.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "628a481780561150481a9ec74709092b9759b3ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/628a481780561150481a9ec74709092b9759b3ec",
"reference": "628a481780561150481a9ec74709092b9759b3ec",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
"bin/phpcs",
"bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2018-07-26T23:47:18+00:00"
},
{
"name": "symfony/asset",
"version": "v4.1.3",
......
before_script:
- php -v
- cp .env.ci.dist .env
- composer install
- php bin/console doctrine:schema:drop --full-database --force
- php bin/console doctrine:migrations:migrate
test-php7:
tags:
- php7.2
script:
- ./vendor/bin/phpcs --standard=PSR2 --ignore=node_modules/,vendor/,config/,var/,public/,src/Migrations .
......@@ -107,7 +107,8 @@ class Product
*/
private $description;
public function __construct() {
public function __construct()
{
$this->categories = new ArrayCollection();
}
......
......@@ -119,6 +119,9 @@
"psr/simple-cache": {
"version": "1.0.1"
},
"squizlabs/php_codesniffer": {
"version": "3.3.1"
},
"symfony/asset": {
"version": "v4.1.3"
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment