Deps reinstall. Refactoring.

This commit is contained in:
Alexey Skobkin 2019-01-20 05:50:09 +03:00
parent 6a95bbee34
commit c9047ae0a9
14 changed files with 395 additions and 359 deletions

View File

@ -17,18 +17,18 @@
"require": { "require": {
"php": ">=7.1.0", "php": ">=7.1.0",
"doctrine/annotations": "^1.3", "doctrine/annotations": "^1.3",
"doctrine/doctrine-bundle": "^1.4",
"doctrine/doctrine-migrations-bundle": "^2.0", "doctrine/doctrine-migrations-bundle": "^2.0",
"doctrine/orm": "^2.5",
"sensio/framework-extra-bundle": "^5.2", "sensio/framework-extra-bundle": "^5.2",
"sentry/sentry-symfony": "^2.2", "sentry/sentry-symfony": "^2.2",
"symfony/console": "^4.2",
"symfony/finder": "^4.2",
"symfony/flex": "^1.1", "symfony/flex": "^1.1",
"symfony/form": "^4.2", "symfony/form": "^4.2",
"symfony/monolog-bundle": "^3.3",
"symfony/orm-pack": "^1.0", "symfony/orm-pack": "^1.0",
"symfony/security-bundle": "^4.2", "symfony/security-bundle": "^4.2",
"symfony/translation": "^4.2", "symfony/translation": "^4.2",
"symfony/twig-bundle": "^4.2", "symfony/twig-bundle": "^4.2",
"symfony/yaml": "^4.2",
"theodordiaconu/geshi": "dev-master", "theodordiaconu/geshi": "dev-master",
"theodordiaconu/geshi-bundle": "dev-master" "theodordiaconu/geshi-bundle": "dev-master"
},"require-dev": { },"require-dev": {

538
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "3488c5d4756be564e9c5076a918bd373", "content-hash": "12a1646d5d2aeff9249a996492e96c85",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
@ -1291,84 +1291,6 @@
], ],
"time": "2018-06-13T13:22:40+00:00" "time": "2018-06-13T13:22:40+00:00"
}, },
{
"name": "monolog/monolog",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2018-11-05T09:00:11+00:00"
},
{ {
"name": "ocramius/package-versions", "name": "ocramius/package-versions",
"version": "1.3.0", "version": "1.3.0",
@ -3063,137 +2985,6 @@
], ],
"time": "2019-01-05T16:37:49+00:00" "time": "2019-01-05T16:37:49+00:00"
}, },
{
"name": "symfony/monolog-bridge",
"version": "v4.2.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bridge.git",
"reference": "8fa559511f1d215ca81e22f222d50eb029f93902"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/8fa559511f1d215ca81e22f222d50eb029f93902",
"reference": "8fa559511f1d215ca81e22f222d50eb029f93902",
"shasum": ""
},
"require": {
"monolog/monolog": "~1.19",
"php": "^7.1.3",
"symfony/contracts": "^1.0",
"symfony/http-kernel": "~3.4|~4.0"
},
"conflict": {
"symfony/console": "<3.4",
"symfony/http-foundation": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0",
"symfony/event-dispatcher": "~3.4|~4.0",
"symfony/security-core": "~3.4|~4.0",
"symfony/var-dumper": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.",
"symfony/event-dispatcher": "Needed when using log messages in console commands.",
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
"symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
},
"type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bridge\\Monolog\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Monolog Bridge",
"homepage": "https://symfony.com",
"time": "2019-01-03T09:07:35+00:00"
},
{
"name": "symfony/monolog-bundle",
"version": "v3.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bundle.git",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff",
"shasum": ""
},
"require": {
"monolog/monolog": "~1.22",
"php": ">=5.6",
"symfony/config": "~2.7|~3.3|~4.0",
"symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10",
"symfony/http-kernel": "~2.7|~3.3|~4.0",
"symfony/monolog-bridge": "~2.7|~3.3|~4.0"
},
"require-dev": {
"symfony/console": "~2.7|~3.3|~4.0",
"symfony/phpunit-bridge": "^3.3|^4.0",
"symfony/yaml": "~2.7|~3.3|~4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\MonologBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony MonologBundle",
"homepage": "http://symfony.com",
"keywords": [
"log",
"logging"
],
"time": "2018-11-04T09:58:13+00:00"
},
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v4.2.2", "version": "v4.2.2",
@ -4278,6 +4069,65 @@
], ],
"time": "2019-01-03T09:09:06+00:00" "time": "2019-01-03T09:09:06+00:00"
}, },
{
"name": "symfony/yaml",
"version": "v4.2.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/d0aa6c0ea484087927b49fd513383a7d36190ca6",
"reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2019-01-03T09:07:35+00:00"
},
{ {
"name": "theodordiaconu/geshi", "name": "theodordiaconu/geshi",
"version": "dev-master", "version": "dev-master",
@ -4761,6 +4611,84 @@
], ],
"time": "2016-10-17T18:31:11+00:00" "time": "2016-10-17T18:31:11+00:00"
}, },
{
"name": "monolog/monolog",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2018-11-05T09:00:11+00:00"
},
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
"version": "v9.99.99", "version": "v9.99.99",
@ -5008,6 +4936,137 @@
], ],
"time": "2019-01-03T09:07:35+00:00" "time": "2019-01-03T09:07:35+00:00"
}, },
{
"name": "symfony/monolog-bridge",
"version": "v4.2.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bridge.git",
"reference": "8fa559511f1d215ca81e22f222d50eb029f93902"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/8fa559511f1d215ca81e22f222d50eb029f93902",
"reference": "8fa559511f1d215ca81e22f222d50eb029f93902",
"shasum": ""
},
"require": {
"monolog/monolog": "~1.19",
"php": "^7.1.3",
"symfony/contracts": "^1.0",
"symfony/http-kernel": "~3.4|~4.0"
},
"conflict": {
"symfony/console": "<3.4",
"symfony/http-foundation": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0",
"symfony/event-dispatcher": "~3.4|~4.0",
"symfony/security-core": "~3.4|~4.0",
"symfony/var-dumper": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.",
"symfony/event-dispatcher": "Needed when using log messages in console commands.",
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
"symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
},
"type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bridge\\Monolog\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Monolog Bridge",
"homepage": "https://symfony.com",
"time": "2019-01-03T09:07:35+00:00"
},
{
"name": "symfony/monolog-bundle",
"version": "v3.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bundle.git",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff",
"shasum": ""
},
"require": {
"monolog/monolog": "~1.22",
"php": ">=5.6",
"symfony/config": "~2.7|~3.3|~4.0",
"symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10",
"symfony/http-kernel": "~2.7|~3.3|~4.0",
"symfony/monolog-bridge": "~2.7|~3.3|~4.0"
},
"require-dev": {
"symfony/console": "~2.7|~3.3|~4.0",
"symfony/phpunit-bridge": "^3.3|^4.0",
"symfony/yaml": "~2.7|~3.3|~4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\MonologBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony MonologBundle",
"homepage": "http://symfony.com",
"keywords": [
"log",
"logging"
],
"time": "2018-11-04T09:58:13+00:00"
},
{ {
"name": "symfony/polyfill-php72", "name": "symfony/polyfill-php72",
"version": "v1.10.0", "version": "v1.10.0",
@ -5340,65 +5399,6 @@
"description": "Symfony WebServerBundle", "description": "Symfony WebServerBundle",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-01-03T09:07:35+00:00" "time": "2019-01-03T09:07:35+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.2.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/d0aa6c0ea484087927b49fd513383a7d36190ca6",
"reference": "d0aa6c0ea484087927b49fd513383a7d36190ca6",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2019-01-03T09:07:35+00:00"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -4,14 +4,14 @@ return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
DT\Bundle\GeshiBundle\DTGeshiBundle::class => ['all' => true], DT\Bundle\GeshiBundle\DTGeshiBundle::class => ['all' => true],
Sentry\SentryBundle\SentryBundle::class => ['all' => true], Sentry\SentryBundle\SentryBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
]; Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
];

View File

@ -1,29 +1,19 @@
monolog: monolog:
handlers: handlers:
main: main:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug level: debug
console: channels: ["!event"]
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: INFO
VERBOSITY_VERY_VERBOSE: DEBUG
channels: ["!doctrine"]
console_very_verbose:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: NOTICE
VERBOSITY_VERY_VERBOSE: NOTICE
VERBOSITY_DEBUG: DEBUG
channels: ["doctrine"]
# uncomment to get logging in your browser # uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration # you may have to allow bigger header sizes in your Web server configuration
#firephp: #firephp:
# type: firephp # type: firephp
# level: info # level: info
#chromephp: #chromephp:
# type: chromephp # type: chromephp
# level: info # level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

View File

@ -0,0 +1,10 @@
# src/AppBundle/Resources/config/dataFixture.yml
services:
_defaults:
tags: ['doctrine.fixture.orm']
autowire: true # if you need dependency injection, see next bullet point
bind:
$projectDir: '%kernel.project_dir%'
App\DataFixtures\ORM\:
resource: '%kernel.project_dir%/src/DataFixtures/ORM/*'

View File

@ -1,3 +1,6 @@
web_profiler: web_profiler:
toolbar: true toolbar: true
intercept_redirects: false intercept_redirects: false
framework:
profiler: { only_exceptions: false }

View File

@ -1,12 +1,25 @@
monolog: monolog:
handlers: handlers:
main: main:
type: fingers_crossed type: fingers_crossed
action_level: error action_level: error
handler: nested handler: nested
excluded_404s:
# regex: exclude all 404 errors from the logs
- ^/
nested: nested:
type: stream type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug level: debug
console: console:
type: console type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]

View File

@ -0,0 +1,7 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]

View File

@ -0,0 +1,10 @@
# src/AppBundle/Resources/config/dataFixture.yml
services:
_defaults:
tags: ['doctrine.fixture.orm']
autowire: true # if you need dependency injection, see next bullet point
bind:
$projectDir: '%kernel.project_dir%'
App\DataFixtures\ORM\:
resource: '%kernel.project_dir%/src/DataFixtures/ORM/*'

View File

@ -1,3 +1,6 @@
web_profiler: web_profiler:
toolbar: false toolbar: false
intercept_redirects: false intercept_redirects: false
framework:
profiler: { collect: false }

View File

@ -1,7 +0,0 @@
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

View File

@ -2,48 +2,28 @@
namespace App\DataFixtures\ORM; namespace App\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Query;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use App\Entity\Language; use App\Entity\Language;
/** class LoadLanguages extends Fixture
* Description of LoadLanguages
*
* @author Alexey Skobkin
*/
class LoadLanguages implements FixtureInterface, ContainerAwareInterface
{ {
/** /** @var string */
* @var ContainerInterface private $projectDir;
*/
private $container; public function __construct(string $projectDir)
/**
* {@inheritDoc}
*/
public function setContainer(ContainerInterface $container = null)
{ {
$this->container = $container; $this->projectDir = $projectDir;
} }
/**
* {@inheritDoc}
*/
public function load(ObjectManager $manager) public function load(ObjectManager $manager)
{ {
$output = new ConsoleOutput(); $geshiPath = $this->projectDir.'/vendor/theodordiaconu/geshi/src/GeSHi/geshi';
$geshiPath = $this->container->get('kernel')->getRootDir() . '/../vendor/theodordiaconu/geshi/src/GeSHi/geshi';
$finder = new Finder(); $finder = new Finder();
$finder->files()->in($geshiPath); $finder->files()->in($geshiPath);
// Fix constants // Fix constants
define('GESHI_CAPS_NO_CHANGE', true); define('GESHI_CAPS_NO_CHANGE', true);
define('GESHI_COMMENTS', true); define('GESHI_COMMENTS', true);
@ -73,26 +53,19 @@ class LoadLanguages implements FixtureInterface, ContainerAwareInterface
define('GESHI_CLASS', true); define('GESHI_CLASS', true);
define('GESHI_NUMBER_OCT_PREFIX_0O', true); define('GESHI_NUMBER_OCT_PREFIX_0O', true);
define('GESHI_NUMBER_OCT_PREFIX_AT', true); define('GESHI_NUMBER_OCT_PREFIX_AT', true);
/* @var $file SplFileInfo */ /* @var $file \SplFileInfo */
foreach ($finder as $file) { foreach ($finder as $file) {
$output->writeln($file->getRelativePathname() . ' found. Parsing...');
include $geshiPath.DIRECTORY_SEPARATOR.$file->getRelativePathname(); include $geshiPath.DIRECTORY_SEPARATOR.$file->getRelativePathname();
$language = new Language(); $language = new Language(
$language $language_data['LANG_NAME'],
->setName($language_data['LANG_NAME']) basename($file->getRelativePathname(), '.php')
->setCode(basename($file->getRelativePathname(), '.php')) );
->setIsEnabled(true)
;
$output->write('---> "' . $language->getName() . '"');
$manager->persist($language); $manager->persist($language);
$manager->flush();
$output->writeln(' [ PERSISTED ]');
} }
$output->writeln('Import finished!'); $manager->flush();
} }
} }

View File

@ -51,6 +51,13 @@ class Language
*/ */
private $isEnabled; private $isEnabled;
public function __construct(string $name, string $code, bool $enabled = true)
{
$this->name = $name;
$this->code = $code;
$this->isEnabled = $enabled;
}
public function getId(): int public function getId(): int
{ {
return $this->id; return $this->id;

View File

@ -1,4 +1,16 @@
{ {
"doctrine/data-fixtures": {
"version": "v1.3.1"
},
"doctrine/doctrine-fixtures-bundle": {
"version": "3.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.0",
"ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3"
}
},
"easycorp/easy-log-handler": { "easycorp/easy-log-handler": {
"version": "1.0", "version": "1.0",
"recipe": { "recipe": {
@ -8,6 +20,9 @@
"ref": "70062abc2cd58794d2a90274502f81b55cd9951b" "ref": "70062abc2cd58794d2a90274502f81b55cd9951b"
} }
}, },
"monolog/monolog": {
"version": "1.24.0"
},
"symfony/cache": { "symfony/cache": {
"version": "v4.2.2" "version": "v4.2.2"
}, },
@ -92,12 +107,24 @@
"symfony/monolog-bridge": { "symfony/monolog-bridge": {
"version": "v4.2.2" "version": "v4.2.2"
}, },
"symfony/monolog-bundle": {
"version": "3.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.1",
"ref": "18ebf5a940573a20de06f9c4060101eeb438cf3d"
}
},
"symfony/options-resolver": { "symfony/options-resolver": {
"version": "v4.2.2" "version": "v4.2.2"
}, },
"symfony/orm-pack": { "symfony/orm-pack": {
"version": "v1.0.6" "version": "v1.0.6"
}, },
"symfony/polyfill-php72": {
"version": "v1.10.0"
},
"symfony/process": { "symfony/process": {
"version": "v4.2.2" "version": "v4.2.2"
}, },