Skip to content

Commit

Permalink
upgrade from symfony 3 to 4
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymackenzie committed Jun 1, 2019
1 parent ea00f68 commit b970081
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 27 deletions.
2 changes: 0 additions & 2 deletions app/bootstrap.php
Expand Up @@ -21,8 +21,6 @@
,'ProtectedBundle\ProtectedBundle'
,'Symfony\Bundle\DebugBundle\DebugBundle'=> ['dev', 'test']
,'Symfony\Bundle\WebProfilerBundle\WebProfilerBundle'=> ['dev', 'test']
,'Sensio\Bundle\DistributionBundle\SensioDistributionBundle'=> ['dev', 'test']
,'Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle'=> ['dev', 'test']
]
,'loader'=> $loader
,'paths'=> [
Expand Down
2 changes: 1 addition & 1 deletion app/config/parameters.yml.dist
Expand Up @@ -3,7 +3,7 @@ parameters:
protected.host: 'protected.tobymackenzie.com'
protected.host.test: '^protected\.tobymackenzie\.com'
public.host: 'www.tobymackenzie.com'
public.host.test: '(^(.*\.)?tobymackenzie\.com$)|(^[0-9\.]+$)|(^.*:.*:.*$)'
public.host.test: '^(.*\.)?tobymackenzie\.com|[0-9\.]+|.*:.*:.*$'

#==security
protected.secure.encoder: 'plaintext'
Expand Down
4 changes: 4 additions & 0 deletions app/config/services.yml
Expand Up @@ -19,6 +19,10 @@ services:
TJM\Views\Views:
arguments: ['@router', '%tjm_base.wraps%']
public: true
##==commands
PublicBundle\Command\:
resource: '%kernel.project_dir%/src/PublicBundle/Command'
tags: ['console.command']
##==controllers
ProtectedBundle\Controller\:
resource: '%kernel.project_dir%/src/ProtectedBundle/Controller'
Expand Down
6 changes: 0 additions & 6 deletions app/web/_app.php
Expand Up @@ -13,12 +13,6 @@
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
}
}elseif($app->getEnvironment() === 'prod' && PHP_VERSION_ID < 70000){
include_once __DIR__ . '/../../var/bootstrap.php.cache';
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
*/
}

$app->runWeb();
27 changes: 9 additions & 18 deletions composer.json
Expand Up @@ -20,11 +20,6 @@
"vendor/wp/plugin-{$name}": ["type:wordpress-plugin"]
,"vendor/wp/theme-{$name}": ["type:wordpress-theme"]
}
,"symfony-app-dir": "app"
,"symfony-assets-install": "relative"
,"symfony-bin-dir": "bin"
,"symfony-var-dir": "var"
,"symfony-web-dir": "web"
,"wordpress-install-dir": "vendor/wp/wordpress"
}
,"disabled": {
Expand All @@ -34,10 +29,9 @@
,"prefer-stable": true
,"require": {
"php": ">=5.5.9"
,"symfony/symfony": "3.4.*"
,"symfony/symfony": "^4"
,"symfony/monolog-bundle": "^3.1"
,"symfony/polyfill-apcu": "^1.0"
,"sensio/distribution-bundle": "^5.0"
,"sensio/framework-extra-bundle": "^5.0.0"
,"incenteev/composer-parameter-handler": "^2.0"
,"twig/twig": "^1.0||^2.0"
Expand All @@ -55,8 +49,7 @@
,"wpackagist-plugin/wordpress-importer": "^0.6"
}
,"require-dev": {
"sensio/generator-bundle": "^3.0"
,"symfony/phpunit-bridge": "^3.0"
"symfony/phpunit-bridge": "^4"
}
,"repositories": [
{
Expand All @@ -69,17 +62,15 @@
}
]
,"scripts": {
"_symfony-scripts": [
"post": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
,"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
,"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache"
,"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets"
,"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
,"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
,"bin/wp-install"
,"@php bin/console cache:clear --env prod"
,"@php bin/console cache:clear"
,"@php bin/console assets:install --symlink --relative web"
,"@php bin/wp-install"
]
,"post-install-cmd": ["@_symfony-scripts"]
,"post-update-cmd": ["@_symfony-scripts"]
,"post-install-cmd": ["@post"]
,"post-update-cmd": ["@post"]
}
,"type": "project"
}

0 comments on commit b970081

Please sign in to comment.