Update and audit existing project dependencies for Symfony/Flex.

- Converted all non-flex bundles with available bundles into Symfony/Flex.
- Updated namespaces to more closely match Symfony.
- Removed unnecessary dependencies and recipes.
- Executed Symfony/Flex recipes to create default configs.
- Improved composer.json scripts.
This commit is contained in:
Dillon-Brown 2020-02-03 18:01:16 +00:00
parent 48ddf269b0
commit 8cf555f4ee
33 changed files with 1085 additions and 1159 deletions

View file

@ -1,4 +1,4 @@
# define your env variables for the test environment here # define your env variables for the test environment here
KERNEL_CLASS='SuiteCRM\Core\Base\Kernel' KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st' APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999 SYMFONY_DEPRECATIONS_HELPER=999999

View file

@ -1,28 +1,12 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use SuiteCRM\Core\src\Kernel; use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\ErrorHandler\Debug;
if (count($argv) === 1 && $argv[0] === 'bin/console') { if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo
"
\033[38;5;167m OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\033[38;5;240m00000000000000000000000000000000000000000
\033[38;5;167m OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\033[38;5;240m00000\033[1;37m000000\033[38;5;240m00\033[1;37m0000000\033[38;5;240m00000\033[1;37m000\033[38;5;240m000000000\033[1;37m000\033[38;5;240mG00
\033[38;5;167m OOOG\033[1;37m000\033[38;5;167mGOOO\033[1;37m0\033[38;5;167mOOOO\033[1;37m0\033[38;5;167mOOC\033[1;37m0\033[38;5;167mOOC\033[1;37m00000\033[38;5;167mGOC\033[1;37m0000\033[38;5;167mOOO\033[38;5;240m\033[38;5;240m0000\033[1;37m00000\033[38;5;240mG0000\033[1;37m000\033[38;5;240m000C\033[1;37m00\033[38;5;240m00C\033[1;37m00\033[38;5;240m0\033[1;37m0\033[38;5;240m0000000\033[1;37m0\033[38;5;240m0\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOG\033[1;37m0\033[38;5;167mCOOOOOO\033[1;37m0\033[38;5;167mOOOO\033[1;37m0\033[38;5;167mOOC\033[1;37m0\033[38;5;167mOOOOC\033[1;37m0\033[38;5;167mGOOOC\033[1;37m0\033[38;5;167mGOOOO\033[38;5;240m0000\033[1;37m0000\033[38;5;240mC000000\033[1;37m000\033[38;5;240m0000G\033[1;37m0\033[38;5;240m00C\033[1;37m00\033[38;5;240m0\033[1;37m00\033[38;5;240m00000\033[1;37m00\033[38;5;240m0\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOOC\033[1;37m00\033[38;5;167mCOOOO\033[1;37m0\033[38;5;167mOOOO\033[1;37m0\033[38;5;167mOOC\033[1;37m0\033[38;5;167mOOOOC\033[1;37m0\033[38;5;167mGOOOC\033[1;37m000\033[38;5;167mOOO\033[38;5;240m000C\033[1;37m0000\033[38;5;240mG000000\033[1;37m000\033[38;5;240m000C\033[1;37m00\033[38;5;240m00C\033[1;37m00\033[38;5;240m00\033[1;37m00\033[38;5;240m000\033[1;37m00\033[38;5;240m00\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOOOOOC\033[1;37m0\033[38;5;167mOOO\033[1;37m0\033[38;5;167mOOO\033[1;37m00\033[38;5;167mOOC\033[1;37m0\033[38;5;167mOOOOC\033[1;37m0\033[38;5;167mGOOOC\033[1;37m0\033[38;5;167mGOOOO\033[38;5;240m0000\033[1;37m0000\033[38;5;240mC000000\033[1;37m00000000\033[38;5;240m000C\033[1;37m00\033[38;5;240m00C\033[1;37m00\033[38;5;240m0\033[1;37m00\033[38;5;240m000\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOOC\033[1;37m000\033[38;5;167mCOOOG\033[1;37m0000\033[38;5;167mGOOC\033[1;37m0\033[38;5;167mOOOOC\033[1;37m0\033[38;5;167mGOOOC\033[1;37m0000\033[38;5;167mOOO\033[38;5;240m0000\033[1;37m00000\033[38;5;240mG0000\033[1;37m000\033[38;5;240m000C\033[1;37m00\033[38;5;240m00C\033[1;37m00\033[38;5;240m000C\033[1;37m000\033[38;5;240m0000\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\033[38;5;240m0000G\033[1;37m000000\033[38;5;240m00\033[1;37m000\033[38;5;240m0000G\033[1;37m00\033[38;5;240m0C\033[1;37m00\033[38;5;240m00000000000\033[1;37m00\033[38;5;240mG00
\033[38;5;167m OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\033[38;5;240m00000000000000000000000000000000000000000\033[1;37m
";
}
if (false === in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL; echo 'Warning: The console should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL;
} }
@ -31,7 +15,7 @@ set_time_limit(0);
require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__) . '/vendor/autoload.php';
if (!class_exists(Application::class)) { if (!class_exists(Application::class)) {
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
} }
$input = new ArgvInput(); $input = new ArgvInput();
@ -49,15 +33,10 @@ if ($_SERVER['APP_DEBUG']) {
umask(0000); umask(0000);
if (class_exists(Debug::class)) { if (class_exists(Debug::class)) {
/** @noinspection UnusedFunctionResultInspection */
Debug::enable(); Debug::enable();
} }
} }
$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); $kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
$application = new Application($kernel); $application = new Application($kernel);
try { $application->run($input);
$application->run($input);
} catch (Exception $exception) {
echo 'An error occurred while attempting to run the application ' . $exception->getMessage();
}

View file

@ -3,6 +3,11 @@
"description": "SuiteCRM Application", "description": "SuiteCRM Application",
"homepage": "https://suitecrm.com", "homepage": "https://suitecrm.com",
"type": "project", "type": "project",
"authors": [
{
"name": "SalesAgility Ltd"
}
],
"config": { "config": {
"vendor-dir": "vendor", "vendor-dir": "vendor",
"platform": { "platform": {
@ -11,34 +16,17 @@
"optimize-autoloader": true, "optimize-autoloader": true,
"sort-packages": true "sort-packages": true
}, },
"minimum-stability": "dev",
"prefer-stable": true,
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"api-platform/api-pack": "^1.2", "api-platform/api-pack": "^1.2",
"bshaffer/oauth2-server-httpfoundation-bridge": "^1.4",
"bshaffer/oauth2-server-php": "^1.11.1",
"composer/installers": "~1.0",
"doctrine/cache": "^1.8",
"doctrine/dbal": "^2.9",
"doctrine/orm": "2.6.*",
"monolog/monolog": "^1.23",
"phpdocumentor/type-resolver": "^0.4.0",
"pimple/pimple": "^3.2",
"psr/log": "^1.1",
"symfony/cache": "^4.4",
"symfony/config": "^4.2",
"symfony/console": "^4.4",
"symfony/dependency-injection": "^4.4",
"symfony/dotenv": "^4.4", "symfony/dotenv": "^4.4",
"symfony/error-handler": "^4.4",
"symfony/filesystem": "^4.4",
"symfony/finder": "^4.4",
"symfony/flex": "^1.6", "symfony/flex": "^1.6",
"symfony/framework-bundle": "^4.4", "symfony/framework-bundle": "^4.4",
"symfony/http-foundation": "^4.2",
"symfony/http-kernel": "^4.4",
"symfony/monolog-bundle": "^3.5", "symfony/monolog-bundle": "^3.5",
"symfony/routing": "4.4.x-dev", "symfony/orm-pack": "^1.0",
"symfony/yaml": "^4.2", "symfony/security-bundle": "^4.4",
"webonyx/graphql-php": "^0.13.8" "webonyx/graphql-php": "^0.13.8"
}, },
"require-dev": { "require-dev": {
@ -47,22 +35,13 @@
"codeception/module-asserts": "^1.1", "codeception/module-asserts": "^1.1",
"dama/doctrine-test-bundle": "^5.0", "dama/doctrine-test-bundle": "^5.0",
"doctrine/doctrine-fixtures-bundle": "~3.2", "doctrine/doctrine-fixtures-bundle": "~3.2",
"phploc/phploc": "^4.0.1", "doctrine/doctrine-migrations-bundle": "^2.1",
"phpmetrics/phpmetrics": "^2.4.1",
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"symfony/maker-bundle": "^1.14" "symfony/maker-bundle": "^1.14"
}, },
"conflict": {
"symfony/symfony": "*"
},
"license": "GPL-3.0",
"authors": [
{
"name": "SalesAgility Ltd"
}
],
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"App\\": "core/src/",
"SuiteCRM\\Core\\src\\": "core/src/", "SuiteCRM\\Core\\src\\": "core/src/",
"SuiteCRM\\Core\\Modules\\": "core/modules/", "SuiteCRM\\Core\\Modules\\": "core/modules/",
"SuiteCRM\\Core\\Legacy\\": "core/legacy/", "SuiteCRM\\Core\\Legacy\\": "core/legacy/",
@ -72,15 +51,23 @@
"App\\Entity\\": "core/src/Entity/" "App\\Entity\\": "core/src/Entity/"
} }
}, },
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"src-dir": "core/src"
},
"scripts": { "scripts": {
"auto-scripts": { "auto-scripts": {
"cache:clear": "symfony-cmd", "cache:clear": "symfony-cmd",
"cache:warmup": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd" "assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"extra": {
"src-dir": "core/src",
"symfony": {
"allow-contrib": false
} }
} }
} }

1511
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ require dirname(__DIR__) . '/vendor/autoload.php';
// Load cached env vars if the .env.local.php file exists // Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2) // Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__) . '/.env.local.php') && ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV']) { if (is_array($env = @include dirname(__DIR__) . '/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
foreach ($env as $k => $v) { foreach ($env as $k => $v) {
$_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v); $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
} }

View file

@ -9,4 +9,7 @@ return [
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
]; ];

View file

@ -1,39 +1,39 @@
api_platform: api_platform:
graphql: graphql:
graphiql: graphiql:
enabled: false enabled: false
graphql_playground: graphql_playground:
enabled: false enabled: false
mapping: mapping:
paths: ['%kernel.project_dir%/core'] paths: ['%kernel.project_dir%/core']
patch_formats: patch_formats:
json: ['application/merge-patch+json'] json: ['application/merge-patch+json']
graphql: ['application/graphql'] graphql: ['application/graphql']
swagger: swagger:
versions: [3] versions: [3]
oauth: oauth:
# To enable or disable oauth. # To enable or disable oauth.
enabled: true enabled: true
# The oauth client id. # The oauth client id.
clientId: 'scrmfe' clientId: 'scrmfe'
# The oauth client secret. # The oauth client secret.
clientSecret: 'scrmfe' clientSecret: 'scrmfe'
# The oauth type. # The oauth type.
type: 'oauth2' type: 'oauth2'
# The oauth flow grant type. # The oauth flow grant type.
flow: 'password' flow: 'password'
# The oauth token url. # The oauth token url.
tokenUrl: '/oauth/v2/token' tokenUrl: '/oauth/v2/token'
# The oauth authentication url. # The oauth authentication url.
authorizationUrl: '/oauth/v2/auth' authorizationUrl: '/oauth/v2/auth'
# The oauth scopes. # The oauth scopes.
scopes: [] scopes: []
enable_swagger_ui: false enable_swagger_ui: false

View file

@ -1,19 +1,19 @@
framework: framework:
cache: cache:
# Unique name of your app: used to compute stable namespaces for cache keys. # Unique name of your app: used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name #prefix_seed: your_vendor_name/app_name
# The "app" cache stores to the filesystem by default. # The "app" cache stores to the filesystem by default.
# The data in this cache should persist between deploys. # The data in this cache should persist between deploys.
# Other options include: # Other options include:
# Redis # Redis
#app: cache.adapter.redis #app: cache.adapter.redis
#default_redis_provider: redis://localhost #default_redis_provider: redis://localhost
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu #app: cache.adapter.apcu
# Namespaced pools use the above "app" backend by default # Namespaced pools use the above "app" backend by default
#pools: #pools:
#my.dedicated.cache: null #my.dedicated.cache: null

View file

@ -1,19 +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
channels: ["!event"] channels: ["!event"]
# 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: console:
type: console type: console
process_psr_3_messages: false process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"] channels: ["!event", "!doctrine", "!console"]

View file

@ -1,18 +1,18 @@
doctrine: doctrine:
dbal: dbal:
url: '%env(resolve:DATABASE_URL)%' url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version, # IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file) # either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7' #server_version: '5.7'
orm: orm:
auto_generate_proxy_classes: true auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true auto_mapping: true
mappings: mappings:
App: App:
is_bundle: false is_bundle: false
type: annotation type: annotation
dir: '%kernel.project_dir%/core/modules' dir: '%kernel.project_dir%/core/modules'
prefix: 'SuiteCRM\Core\Modules\' prefix: 'SuiteCRM\Core\Modules\'
alias: App alias: App

View file

@ -0,0 +1,5 @@
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
namespace: DoctrineMigrations

View file

@ -1,16 +1,16 @@
framework: framework:
secret: '%env(APP_SECRET)%' secret: '%env(APP_SECRET)%'
#csrf_protection: true #csrf_protection: true
#http_method_override: true #http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it. # Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support. # Remove or comment this section to explicitly disable session support.
session: session:
handler_id: null handler_id: null
cookie_secure: auto cookie_secure: auto
cookie_samesite: lax cookie_samesite: lax
#esi: true #esi: true
#fragments: true #fragments: true
php_errors: php_errors:
log: true log: true

View file

@ -0,0 +1,10 @@
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': null

View file

@ -1,20 +1,20 @@
doctrine: doctrine:
orm: orm:
auto_generate_proxy_classes: false auto_generate_proxy_classes: false
metadata_cache_driver: metadata_cache_driver:
type: pool type: pool
pool: doctrine.system_cache_pool pool: doctrine.system_cache_pool
query_cache_driver: query_cache_driver:
type: pool type: pool
pool: doctrine.system_cache_pool pool: doctrine.system_cache_pool
result_cache_driver: result_cache_driver:
type: pool type: pool
pool: doctrine.result_cache_pool pool: doctrine.result_cache_pool
framework: framework:
cache: cache:
pools: pools:
doctrine.result_cache_pool: doctrine.result_cache_pool:
adapter: cache.app adapter: cache.app
doctrine.system_cache_pool: doctrine.system_cache_pool:
adapter: cache.system adapter: cache.system

View file

@ -1,23 +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_http_codes: [404, 405] excluded_http_codes: [404, 405]
nested: # Prevents memory leaks
type: stream buffer_size: 50
path: "%kernel.logs_dir%/%kernel.environment%.log" nested:
level: debug type: stream
console: path: "%kernel.logs_dir%/%kernel.environment%.log"
type: console level: debug
process_psr_3_messages: false console:
channels: ["!event", "!doctrine"] type: console
deprecation: process_psr_3_messages: false
type: stream channels: ["!event", "!doctrine"]
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" deprecation:
deprecation_filter: type: stream
type: filter path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
handler: deprecation deprecation_filter:
max_level: info type: filter
channels: ["php"] handler: deprecation
max_level: info
channels: ["php"]

View file

@ -1,3 +1,3 @@
framework: framework:
router: router:
strict_requirements: null strict_requirements: null

View file

@ -1,3 +1,3 @@
framework: framework:
router: router:
utf8: true utf8: true

View file

@ -1,22 +1,10 @@
security: security:
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers providers:
providers: in_memory: { memory: null }
in_memory: { memory: null } firewalls:
firewalls: dev:
dev: pattern: ^/(_(profiler|wdt)|css|images|js)/
pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false
security: false main:
main: anonymous: lazy
anonymous: lazy access_control:
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication
# https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }

View file

@ -1,4 +1,4 @@
dama_doctrine_test: dama_doctrine_test:
enable_static_connection: true enable_static_connection: true
enable_static_meta_data_cache: true enable_static_meta_data_cache: true
enable_static_query_cache: true enable_static_query_cache: true

View file

@ -1,4 +1,4 @@
framework: framework:
test: true test: true
session: session:
storage_id: session.storage.mock_file storage_id: session.storage.mock_file

View file

@ -1,7 +1,12 @@
monolog: monolog:
handlers: handlers:
main: main:
type: stream type: fingers_crossed
path: "%kernel.logs_dir%/%kernel.environment%.log" action_level: error
level: debug handler: nested
channels: ["!event"] excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug

View file

@ -1,2 +1,2 @@
twig: twig:
strict_variables: true strict_variables: true

View file

@ -1,3 +1,3 @@
framework: framework:
validation: validation:
not_compromised_password: false not_compromised_password: false

View file

@ -1,2 +1,2 @@
twig: twig:
default_path: '%kernel.project_dir%/templates' default_path: '%kernel.project_dir%/templates'

View file

@ -1,8 +1,8 @@
framework: framework:
validation: validation:
email_validation_mode: html5 email_validation_mode: html5
# Enables validator auto-mapping support. # Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata. # For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping: #auto_mapping:
# App\Entity\: [] # App\Entity\: []

View file

@ -0,0 +1,3 @@
#controllers:
# resource: ../../src/Controller/
# type: annotation

View file

@ -1,4 +1,4 @@
api_platform: api_platform:
resource: . resource: .
type: api_platform type: api_platform
prefix: /api prefix: /api

View file

@ -1,3 +1,3 @@
_errors: _errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml' resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error prefix: /_error

View file

@ -1,28 +1,28 @@
framework: framework:
secret: "%secret%" secret: "%secret%"
parameters: parameters:
secret: ThisTokenIsNotSoSecretChangeIt secret: ThisTokenIsNotSoSecretChangeIt
services: services:
# default configuration for services in *this* file # default configuration for services in *this* file
_defaults: _defaults:
autowire: true # Automatically injects dependencies in your services. autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
bind: bind:
$projectDir: '%kernel.project_dir%' $projectDir: '%kernel.project_dir%'
# makes classes in src/ available to be used as services # makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name # this creates a service per class whose id is the fully-qualified class name
App\: App\:
resource: '../core/src/*' resource: '../core/src/*'
exclude: '../core/src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' exclude: '../core/src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected # controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class # as action arguments even if you don't extend any base controller class
SuiteCRM\Core\Modules\: SuiteCRM\Core\Modules\:
resource: '../core/modules/' resource: '../core/modules/'
tags: ['controller.service_arguments'] tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed # add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones # please note that last definitions always *replace* previous ones

View file

@ -1,6 +1,6 @@
<?php <?php
namespace SuiteCRM\Core\src; namespace App;
use Exception; use Exception;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
@ -14,7 +14,7 @@ use function dirname;
/** /**
* Class Kernel * Class Kernel
* @package SuiteCRM\Core\src * @package App
*/ */
class Kernel extends BaseKernel class Kernel extends BaseKernel
{ {

View file

View file

@ -1,6 +1,6 @@
<?php <?php
use SuiteCRM\Core\src\Kernel; use App\Kernel;
use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View file

@ -12,8 +12,7 @@
}, },
"files": [ "files": [
"config/packages/api_platform.yaml", "config/packages/api_platform.yaml",
"config/routes/api_platform.yaml", "config/routes/api_platform.yaml"
"core/base/src/Entity/.gitignore"
] ]
}, },
"api-platform/schema-generator": { "api-platform/schema-generator": {
@ -22,12 +21,6 @@
"behat/gherkin": { "behat/gherkin": {
"version": "v4.6.0" "version": "v4.6.0"
}, },
"bshaffer/oauth2-server-httpfoundation-bridge": {
"version": "v1.4"
},
"bshaffer/oauth2-server-php": {
"version": "v1.11.1"
},
"codeception/codeception": { "codeception/codeception": {
"version": "2.3", "version": "2.3",
"recipe": { "recipe": {
@ -56,19 +49,19 @@
] ]
}, },
"codeception/lib-asserts": { "codeception/lib-asserts": {
"version": "1.1.1" "version": "1.10.1"
}, },
"codeception/module-asserts": { "codeception/module-asserts": {
"version": "1.1.1" "version": "1.1.1"
}, },
"codeception/phpunit-wrapper": { "codeception/phpunit-wrapper": {
"version": "7.8.0" "version": "8.1.1"
}, },
"codeception/stub": { "codeception/stub": {
"version": "3.0.0" "version": "3.6.0"
}, },
"composer/semver": { "composer/semver": {
"version": "1.5.0" "version": "1.5.1"
}, },
"composer/xdebug-handler": { "composer/xdebug-handler": {
"version": "1.4.0" "version": "1.4.0"
@ -94,7 +87,7 @@
"ref": "cb4152ebcadbe620ea2261da1a1c5a9b8cea7672" "ref": "cb4152ebcadbe620ea2261da1a1c5a9b8cea7672"
}, },
"files": [ "files": [
"config/routes/annotations.yaml" "./config/routes/annotations.yaml"
] ]
}, },
"doctrine/cache": { "doctrine/cache": {
@ -104,13 +97,13 @@
"version": "1.6.4" "version": "1.6.4"
}, },
"doctrine/common": { "doctrine/common": {
"version": "v2.11.0" "version": "2.12.0"
}, },
"doctrine/data-fixtures": { "doctrine/data-fixtures": {
"version": "1.4.0" "version": "1.4.2"
}, },
"doctrine/dbal": { "doctrine/dbal": {
"version": "v2.10.0" "version": "v2.10.1"
}, },
"doctrine/doctrine-bundle": { "doctrine/doctrine-bundle": {
"version": "2.0", "version": "2.0",
@ -121,10 +114,8 @@
"ref": "a9f2463b9f73efe74482f831f03a204a41328555" "ref": "a9f2463b9f73efe74482f831f03a204a41328555"
}, },
"files": [ "files": [
"config/packages/doctrine.yaml", "./config/packages/doctrine.yaml",
"config/packages/prod/doctrine.yaml", "./config/packages/prod/doctrine.yaml"
"core/base/src/Entity/.gitignore",
"core/base/src/Repository/.gitignore"
] ]
}, },
"doctrine/doctrine-fixtures-bundle": { "doctrine/doctrine-fixtures-bundle": {
@ -136,7 +127,20 @@
"ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3" "ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3"
}, },
"files": [ "files": [
"core/base/src/DataFixtures/AppFixtures.php" "core/src/DataFixtures/AppFixtures.php"
]
},
"doctrine/doctrine-migrations-bundle": {
"version": "1.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.2",
"ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1"
},
"files": [
"./config/packages/doctrine_migrations.yaml",
"./core/src/Migrations/.gitkeep"
] ]
}, },
"doctrine/event-manager": { "doctrine/event-manager": {
@ -151,14 +155,17 @@
"doctrine/lexer": { "doctrine/lexer": {
"version": "1.2.0" "version": "1.2.0"
}, },
"doctrine/migrations": {
"version": "2.2.1"
},
"doctrine/orm": { "doctrine/orm": {
"version": "v2.6.6" "version": "v2.7.0"
}, },
"doctrine/persistence": { "doctrine/persistence": {
"version": "1.3.3" "version": "1.3.6"
}, },
"doctrine/reflection": { "doctrine/reflection": {
"version": "v1.0.0" "version": "v1.1.0"
}, },
"easyrdf/easyrdf": { "easyrdf/easyrdf": {
"version": "0.9.1" "version": "0.9.1"
@ -166,18 +173,6 @@
"fig/link-util": { "fig/link-util": {
"version": "1.1.0" "version": "1.1.0"
}, },
"friendsofphp/php-cs-fixer": {
"version": "2.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.2",
"ref": "cc05ab6abf6894bddb9bbd6a252459010ebe040b"
},
"files": [
".php_cs.dist"
]
},
"guzzlehttp/psr7": { "guzzlehttp/psr7": {
"version": "1.6.1" "version": "1.6.1"
}, },
@ -191,11 +186,29 @@
"version": "1.25.3" "version": "1.25.3"
}, },
"myclabs/deep-copy": { "myclabs/deep-copy": {
"version": "1.9.4" "version": "1.9.5"
},
"nelmio/cors-bundle": {
"version": "1.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.5",
"ref": "6388de23860284db9acce0a7a5d9d13153bcb571"
},
"files": [
"./config/packages/nelmio_cors.yaml"
]
}, },
"nikic/php-parser": { "nikic/php-parser": {
"version": "v4.3.0" "version": "v4.3.0"
}, },
"ocramius/package-versions": {
"version": "1.4.2"
},
"ocramius/proxy-manager": {
"version": "2.2.3"
},
"paragonie/random_compat": { "paragonie/random_compat": {
"version": "v9.99.99" "version": "v9.99.99"
}, },
@ -208,9 +221,6 @@
"php": { "php": {
"version": "7.2.0" "version": "7.2.0"
}, },
"php-cs-fixer/diff": {
"version": "v1.3.0"
},
"phpdocumentor/reflection-common": { "phpdocumentor/reflection-common": {
"version": "1.0.1" "version": "1.0.1"
}, },
@ -220,17 +230,11 @@
"phpdocumentor/type-resolver": { "phpdocumentor/type-resolver": {
"version": "0.4.0" "version": "0.4.0"
}, },
"phploc/phploc": {
"version": "4.0.1"
},
"phpmetrics/phpmetrics": {
"version": "v2.5.0"
},
"phpspec/prophecy": { "phpspec/prophecy": {
"version": "1.10.1" "version": "v1.10.2"
}, },
"phpunit/php-code-coverage": { "phpunit/php-code-coverage": {
"version": "6.1.4" "version": "7.0.10"
}, },
"phpunit/php-file-iterator": { "phpunit/php-file-iterator": {
"version": "2.0.2" "version": "2.0.2"
@ -250,17 +254,9 @@
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.7", "version": "4.7",
"ref": "f1546d78502f904f37f7b47a42b1444cbf1d3423" "ref": "00fdb38c318774cd39f475a753028a5e8d25d47c"
}, },
"files": [ "files": []
".env.test",
"phpunit.xml.dist",
"config/bootstrap.php",
"tests/.gitignore"
]
},
"pimple/pimple": {
"version": "v3.2.3"
}, },
"psr/cache": { "psr/cache": {
"version": "1.0.1" "version": "1.0.1"
@ -298,11 +294,8 @@
"sebastian/exporter": { "sebastian/exporter": {
"version": "3.1.2" "version": "3.1.2"
}, },
"sebastian/finder-facade": {
"version": "1.2.2"
},
"sebastian/global-state": { "sebastian/global-state": {
"version": "2.0.0" "version": "3.0.0"
}, },
"sebastian/object-enumerator": { "sebastian/object-enumerator": {
"version": "3.0.3" "version": "3.0.3"
@ -323,16 +316,16 @@
"version": "2.0.1" "version": "2.0.1"
}, },
"symfony/asset": { "symfony/asset": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/cache": { "symfony/cache": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/cache-contracts": { "symfony/cache-contracts": {
"version": "v1.1.7" "version": "v1.1.7"
}, },
"symfony/config": { "symfony/config": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/console": { "symfony/console": {
"version": "4.4", "version": "4.4",
@ -340,45 +333,45 @@
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "4.4", "version": "4.4",
"ref": "fead3ab2e80622c61d13dac0d21a3430a45efae8" "ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c"
}, },
"files": [ "files": [
"bin/console", "./bin/console",
"config/bootstrap.php" "./config/bootstrap.php"
] ]
}, },
"symfony/css-selector": { "symfony/css-selector": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/debug": { "symfony/debug": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/dependency-injection": { "symfony/dependency-injection": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/doctrine-bridge": { "symfony/doctrine-bridge": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/dotenv": { "symfony/dotenv": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/error-handler": { "symfony/error-handler": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/event-dispatcher": { "symfony/event-dispatcher": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/event-dispatcher-contracts": { "symfony/event-dispatcher-contracts": {
"version": "v1.1.7" "version": "v1.1.7"
}, },
"symfony/expression-language": { "symfony/expression-language": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/filesystem": { "symfony/filesystem": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/finder": { "symfony/finder": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/flex": { "symfony/flex": {
"version": "1.0", "version": "1.0",
@ -408,18 +401,18 @@
"config/routes/dev/framework.yaml", "config/routes/dev/framework.yaml",
"config/services.yaml", "config/services.yaml",
"public/index.php", "public/index.php",
"core/base/src/Controller/.gitignore", "core/src/Controller/.gitkeep",
"core/base/src/Kernel.php" "core/src/Kernel.php"
] ]
}, },
"symfony/http-foundation": { "symfony/http-foundation": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/http-kernel": { "symfony/http-kernel": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/inflector": { "symfony/inflector": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/maker-bundle": { "symfony/maker-bundle": {
"version": "1.0", "version": "1.0",
@ -431,10 +424,10 @@
} }
}, },
"symfony/mime": { "symfony/mime": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/monolog-bridge": { "symfony/monolog-bridge": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/monolog-bundle": { "symfony/monolog-bundle": {
"version": "3.3", "version": "3.3",
@ -442,16 +435,19 @@
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "master", "branch": "master",
"version": "3.3", "version": "3.3",
"ref": "6240c6d43e8237a32452f057f81816820fd56ab6" "ref": "5f5bdd0f0bd94eedc40ebf637d3c9fe9e48c9689"
}, },
"files": [ "files": [
"config/packages/dev/monolog.yaml", "./config/packages/dev/monolog.yaml",
"config/packages/prod/monolog.yaml", "./config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml" "./config/packages/test/monolog.yaml"
] ]
}, },
"symfony/options-resolver": { "symfony/options-resolver": {
"version": "v4.4.2" "version": "v4.4.4"
},
"symfony/orm-pack": {
"version": "v1.0.7"
}, },
"symfony/polyfill-ctype": { "symfony/polyfill-ctype": {
"version": "v1.13.1" "version": "v1.13.1"
@ -472,13 +468,13 @@
"version": "v1.13.1" "version": "v1.13.1"
}, },
"symfony/process": { "symfony/process": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/property-access": { "symfony/property-access": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/property-info": { "symfony/property-info": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/routing": { "symfony/routing": {
"version": "4.2", "version": "4.2",
@ -507,31 +503,31 @@
] ]
}, },
"symfony/security-core": { "symfony/security-core": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/security-csrf": { "symfony/security-csrf": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/security-guard": { "symfony/security-guard": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/security-http": { "symfony/security-http": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/serializer": { "symfony/serializer": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/service-contracts": { "symfony/service-contracts": {
"version": "v1.1.8" "version": "v1.1.8"
}, },
"symfony/stopwatch": { "symfony/stopwatch": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/translation-contracts": { "symfony/translation-contracts": {
"version": "v1.1.7" "version": "v1.1.7"
}, },
"symfony/twig-bridge": { "symfony/twig-bridge": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/twig-bundle": { "symfony/twig-bundle": {
"version": "4.4", "version": "4.4",
@ -561,19 +557,16 @@
] ]
}, },
"symfony/var-dumper": { "symfony/var-dumper": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/var-exporter": { "symfony/var-exporter": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/web-link": { "symfony/web-link": {
"version": "v4.4.2" "version": "v4.4.4"
}, },
"symfony/yaml": { "symfony/yaml": {
"version": "v4.4.2" "version": "v4.4.4"
},
"theseer/fdomdocument": {
"version": "1.6.6"
}, },
"theseer/tokenizer": { "theseer/tokenizer": {
"version": "1.1.3" "version": "1.1.3"
@ -589,5 +582,11 @@
}, },
"willdurand/negotiation": { "willdurand/negotiation": {
"version": "v2.3.1" "version": "v2.3.1"
},
"zendframework/zend-code": {
"version": "3.4.1"
},
"zendframework/zend-eventmanager": {
"version": "3.2.1"
} }
} }