Skip to content

Commit

Permalink
update symfony to version 4.4 (#1704)
Browse files Browse the repository at this point in the history
  • Loading branch information
pesektomas authored Mar 18, 2020
2 parents 74e48fe + a3e32c9 commit fb3fa6f
Show file tree
Hide file tree
Showing 132 changed files with 872 additions and 921 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ yarn-error.log

/assets/js/translations.json
/assets/js/bundles

/.phpunit.result.cache
1 change: 0 additions & 1 deletion build/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ paths:
params:
- ../config/parameters_test.yml
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
68 changes: 34 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,17 @@
"incenteev/composer-parameter-handler": "^2.1.3",
"intervention/image": "^2.3.14",
"jms/serializer-bundle": "^2.4",
"jms/translation-bundle": "^1.4.1",
"jms/translation-bundle": "^1.4.4",
"joschi127/doctrine-entity-override-bundle": "^0.7.2",
"league/flysystem": "^1.0",
"phing/phing": "^2.16.1",
"presta/sitemap-bundle": "^1.5.3",
"prezent/doctrine-translatable-bundle": "^1.0.3",
"sensio/framework-extra-bundle": "^3.0.29",
"sensio/generator-bundle": "^3.1.7",
"sensio/framework-extra-bundle": "^5.2",
"sensiolabs/security-checker": "^6.0",
"shopsys/doctrine-orm": "^2.6.2",
"shopsys/google-cloud-bundle": "9.0.x-dev",
"shopsys/postgres-search-bundle": "^0.1",
"shopsys/postgres-search-bundle": "^0.2",
"shopsys/migrations": "9.0.x-dev",
"shopsys/form-types-bundle": "9.0.x-dev",
"shopsys/framework": "9.0.x-dev",
Expand All @@ -78,49 +77,50 @@
"stof/doctrine-extensions-bundle": "^1.3.0",
"symfony-cmf/routing": "^2.0.3",
"symfony-cmf/routing-bundle": "^2.0.3",
"symfony/debug": "^3.4",
"symfony/debug-bundle": "^3.4",
"symfony/dotenv": "^3.4",
"symfony/debug": "^4.4.0",
"symfony/debug-bundle": "^4.4.0",
"symfony/dotenv": "^4.4.0",
"symfony/flex": "^1.4",
"symfony/form": "^3.4",
"symfony/monolog-bridge": "^3.0.0",
"symfony/monolog-bundle": "~3.4.0",
"symfony/property-info": "^3.4",
"symfony/proxy-manager-bridge": "^3.4",
"symfony/security-bundle": "^3.4",
"symfony/form": "^4.4.0",
"symfony/monolog-bridge": "^4.4.0",
"symfony/monolog-bundle": "~3.5.0",
"symfony/property-info": "^4.4.0",
"symfony/proxy-manager-bridge": "^4.4.0",
"symfony/security-bundle": "^4.4.0",
"symfony/swiftmailer-bundle": "^3.2.2",
"symfony/templating": "^3.4",
"symfony/translation": "^3.4",
"symfony/twig-bundle": "^3.4",
"symfony/validator": "^3.4",
"symfony/web-link": "^3.4",
"symfony/web-profiler-bundle": "^3.4",
"symfony/web-server-bundle": "^3.4",
"symfony/translation": "^4.4.0",
"symfony/twig-bundle": "^4.4.0",
"symfony/validator": "^4.4.0",
"symfony/web-link": "^4.4.0",
"symfony/web-profiler-bundle": "^4.4.0",
"symfony/web-server-bundle": "^4.4.0",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/workflow": "^3.4",
"symfony/workflow": "^4.4.0",
"tracy/tracy": "^2.4.13",
"twig/extensions": "^1.5.1",
"twig/twig": "^2.4.8",
"vasek-purchart/console-errors-bundle": "^1.0.1",
"twig/twig": "^2.9",
"vasek-purchart/console-errors-bundle": "^3.0.0",
"webmozart/assert": "^1.4"
},
"require-dev": {
"ext-pgsql": "*",
"ext-zip": "*",
"codeception/codeception": "^2.4.0",
"phpstan/phpstan": "^0.11",
"symfony/var-dumper": "^3.4",
"phpunit/phpunit": "^7.0",
"codeception/codeception": "^4.1",
"codeception/module-db": "^1.0",
"codeception/module-webdriver": "^1.0",
"codeception/phpunit-wrapper": "^8.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^8.0",
"shopsys/coding-standards": "9.0.x-dev",
"shopsys/http-smoke-testing": "9.0.x-dev",
"phpstan/phpstan-doctrine": "^0.11.2",
"phpstan/phpstan-phpunit": "^0.11.2",
"sspooky13/yaml-standards": "^4.2.5",
"zalas/phpunit-injector": "^1.2"
"sspooky13/yaml-standards": "^5.0.0",
"symfony/var-dumper": "^4.4.0",
"symfony/browser-kit": "^4.4.0",
"zalas/phpunit-injector": "^1.4"
},
"conflict": {
"symfony/dependency-injection": "3.4.15|3.4.16",
"twig/twig": "2.6.1",
"symfony/symfony": "*"
},
"scripts": {
Expand Down Expand Up @@ -160,7 +160,7 @@
},
"symfony": {
"allow-contrib": true,
"require": "^3.4"
"require": "^4.4"
},
"incenteev-parameters": [
{
Expand Down
1 change: 0 additions & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true],
Prezent\Doctrine\TranslatableBundle\PrezentDoctrineTranslatableBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle::class => ['all' => true],
Shopsys\FormTypesBundle\ShopsysFormTypesBundle::class => ['all' => true],
Shopsys\FrontendApiBundle\ShopsysFrontendApiBundle::class => ['all' => true],
Shopsys\GoogleCloudBundle\ShopsysGoogleCloudBundle::class => ['all' => true],
Expand Down
8 changes: 6 additions & 2 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ doctrine:
# See \Doctrine\DBAL\Connection::getDatabasePlatformVersion().
server_version: "%database_server_version%"
types:
money: \Shopsys\FrameworkBundle\Component\Doctrine\MoneyType

money:
class: \Shopsys\FrameworkBundle\Component\Doctrine\MoneyType
commented: false
tsvector:
class: \Intaro\PostgresSearchBundle\DBAL\TsvectorType
commented: false
orm:
auto_generate_proxy_classes: false
dql:
Expand Down
3 changes: 1 addition & 2 deletions config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ framework:
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
templating:
engines: ['twig']
trusted_hosts: ~
session:
handler_id: snc_redis.session.handler
Expand All @@ -22,3 +20,4 @@ framework:
enabled: false
collect: false
assets: ~
error_controller: 'App\Controller\Front\ErrorController::showAction'
3 changes: 3 additions & 0 deletions config/packages/framework_extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sensio_framework_extra:
router:
annotations: false
2 changes: 0 additions & 2 deletions config/packages/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ security:
user_checker: Shopsys\FrameworkBundle\Model\Security\AdministratorChecker
anonymous: ~
provider: administrators
logout_on_user_change: true
access_denied_url: "/admin/access-denied/"
form_login:
check_path: admin_login_check
Expand All @@ -42,7 +41,6 @@ security:
pattern: ^/
anonymous: ~
provider: user_identities
logout_on_user_change: true
form_login:
check_path: front_login_check
login_path: front_login
Expand Down
2 changes: 1 addition & 1 deletion config/packages/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
twig:
debug: "%kernel.debug%"
exception_controller: 'App\Controller\Front\ErrorController::showAction'
exception_controller: null
form_themes:
- '@ShopsysFramework/Common/Form/theme.html.twig'
- '@ShopsysFramework/Admin/Form/colorpickerFields.html.twig'
Expand Down
13 changes: 13 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,16 @@ services:
App\Controller\Front\ErrorController:
arguments:
$environment: '%kernel.environment%'

App\Controller\Front\RobotsController:
arguments:
$sitemapsUrlPrefix: '%shopsys.sitemaps_url_prefix%'

Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory: ~

sensio_framework_extra.psr7.http_message_factory:
class: Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory

Psr\Http\Message\ServerRequestInterface:
factory: ['@Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory', 'createRequest']
arguments: ['@=service("request_stack").getMasterRequest()']
68 changes: 25 additions & 43 deletions config/services_test.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,70 @@
imports:
- { resource: parameters_test.yml }

framework:
test: true

services:
_defaults:
autowire: true
autoconfigure: true
public: true

Shopsys\FrameworkBundle\Component\Localization\DateTimeFormatter:
factory: ['@Shopsys\FrameworkBundle\Model\Localization\CustomDateTimeFormatterFactory', create]

CommerceGuys\Intl\Currency\CurrencyRepositoryInterface:
class: Shopsys\FrameworkBundle\Model\Localization\IntlCurrencyRepository

Shopsys\FrameworkBundle\Component\EntityExtension\EntityNameResolver:
class: Tests\App\Functional\EntityExtension\OverwritableEntityNameResolver
arguments:
- "%shopsys.entity_extension.map%"

Tests\App\Functional\EntityExtension\OverwritableEntityNameResolver: '@Shopsys\FrameworkBundle\Component\EntityExtension\EntityNameResolver'

joschi127_doctrine_entity_override.event_subscriber.load_orm_metadata:
class: Tests\App\Functional\EntityExtension\OverwritableLoadORMMetadataSubscriber
Tests\App\Functional\EntityExtension\OverwritableLoadORMMetadataSubscriber:
arguments:
- "@service_container"
- "%shopsys.entity_extension.map%"
tags:
- { name: doctrine.event_subscriber, priority: -10 }

League\Flysystem\FilesystemInterface: '@main_filesystem'

Shopsys\FrameworkBundle\Model\Article\ArticleFactoryInterface: '@Shopsys\FrameworkBundle\Model\Article\ArticleFactory'

Shopsys\FrameworkBundle\Model\Article\ArticleFactory: ~
Symfony\Bridge\Twig\Extension\HttpKernelRuntime:
arguments: ['@fragment.handler']

Shopsys\FrameworkBundle\Model\Article\ArticleDataFactoryInterface: '@App\Model\Article\ArticleDataFactory'

Shopsys\FrameworkBundle\Model\Administrator\AdministratorDataFactoryInterface: '@App\Model\Administrator\AdministratorDataFactory'

Shopsys\FrameworkBundle\Model\Category\CategoryDataFactoryInterface: '@App\Model\Category\CategoryDataFactory'

Shopsys\FrameworkBundle\Model\Customer\User\CustomerUserDataFactoryInterface: '@App\Model\Customer\User\CustomerUserDataFactory'

Shopsys\FrameworkBundle\Model\Order\Item\OrderItemDataFactoryInterface: '@App\Model\Order\Item\OrderItemDataFactory'

Shopsys\FrameworkBundle\Model\Order\Item\OrderItemFactoryInterface: '@Shopsys\FrameworkBundle\Model\Order\Item\OrderItemFactory'
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter: ~

Shopsys\FrameworkBundle\Model\Order\OrderDataFactoryInterface: '@App\Model\Order\OrderDataFactory'
Shopsys\FrameworkBundle\Model\Localization\IntlCurrencyRepository: ~

Shopsys\FrameworkBundle\Model\Transport\TransportDataFactoryInterface: '@App\Model\Transport\TransportDataFactory'
Shopsys\FrameworkBundle\Model\Feed\FeedFacade: ~

Shopsys\FrameworkBundle\Model\Product\Availability\AvailabilityDataFactoryInterface: '@Shopsys\FrameworkBundle\Model\Product\Availability\AvailabilityDataFactory'
Shopsys\FrameworkBundle\Component\Router\Security\RouteCsrfProtector: ~

Shopsys\FrameworkBundle\Model\Payment\PaymentDataFactoryInterface: '@App\Model\Payment\PaymentDataFactory'
Shopsys\FrameworkBundle\Component\DataFixture\PersistentReferenceFacade: ~

Shopsys\FrameworkBundle\Model\Product\ProductDataFactoryInterface: '@App\Model\Product\ProductDataFactory'
Shopsys\FrameworkBundle\Component\Router\DomainRouterFactory:
arguments: ['%router.resource%']

Shopsys\FrameworkBundle\Model\Product\Availability\AvailabilityDataFactory: ~
Shopsys\ReadModelBundle\Image\ImageViewFacade: ~

Shopsys\FrameworkBundle\Model\Product\Elasticsearch\ProductExportRepository: ~
Shopsys\ReadModelBundle\Product\Action\ProductActionViewFacade: ~

Shopsys\FrameworkBundle\Model\Product\Brand\BrandDataFactoryInterface: '@App\Model\Product\Brand\BrandDataFactory'
Shopsys\FrameworkBundle\Component\Image\ImageFacade:
arguments: ['%shopsys.image_url_prefix%']

Shopsys\ReadModelBundle\Product\Action\ProductActionViewFacade: ~
Shopsys\FrameworkBundle\Component\Image\ImageLocator:
arguments: ['%shopsys.image_dir%']

Shopsys\ReadModelBundle\Product\Listed\ListedProductViewFacade: ~
League\Flysystem\FilesystemInterface: '@main_filesystem'

Shopsys\ReadModelBundle\Product\Listed\ListedProductViewFacadeInterface: '@Shopsys\ReadModelBundle\Product\Listed\ListedProductViewElasticFacade'
Shopsys\FrameworkBundle\Component\Router\CurrentDomainRouter:
tags:
- { name: router, priority: 70 }

Shopsys\FrameworkBundle\Model\Localization\Localization:
arguments:
$adminLocale: '%shopsys.admin_locale%'

Shopsys\FrameworkBundle\Component\Router\DomainRouterFactory:
arguments: ['%router.resource%']
CommerceGuys\Intl\Currency\CurrencyRepositoryInterface:
class: Shopsys\FrameworkBundle\Model\Localization\IntlCurrencyRepository

Shopsys\FrameworkBundle\Component\CurrencyFormatter\CurrencyFormatterFactory: ~

Shopsys\FrameworkBundle\Model\Localization\IntlCurrencyRepository: ~

Shopsys\FrameworkBundle\Twig\NumberFormatterExtension: ~

Shopsys\FrameworkBundle\Model\Administration\AdministrationFacade: ~

Shopsys\FrameworkBundle\Model\Pricing\PriceConverter: ~

Shopsys\FrameworkBundle\Model\Pricing\Rounding: ~
9 changes: 9 additions & 0 deletions easy-coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ parameters:
Shopsys\CodingStandards\Sniffs\ForbiddenDoctrineInheritanceSniff:
- '*/src/*'
- '*/tests/App/*'

PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods\MethodDeclarationSniff.Underscore:
- '*/tests/App/Test/Codeception/Helper/CloseNewlyOpenedWindowsHelper.php'
- '*/tests/App/Test/Codeception/Helper/DatabaseHelper.php'
- '*/tests/App/Test/Codeception/Helper/DomainHelper.php'
- '*/tests/App/Test/Codeception/Helper/LocalizationHelper.php'
- '*/tests/App/Test/Codeception/Helper/NumberFormatHelper.php'
- '*/tests/App/Test/Codeception/Helper/SymfonyHelper.php'
- '*/tests/App/Test/Codeception/Module/Db.php'
41 changes: 14 additions & 27 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
parameters:

treatPhpDocTypesAsCertain: false

ignoreErrors:
-
# We need to have undefined variable for testing purposes
message: '#^Undefined variable: \$undefined$#'
path: %currentWorkingDirectory%/project-base/src/Controller/Test/ErrorHandlerController.php
-
# We need to have undefined variable for testing purposes
message: '#^Expression "\$undefined\[42\]" on a separate line does not do anything\.$#'
path: %currentWorkingDirectory%/project-base/src/Controller/Test/ErrorHandlerController.php
-
# Ignore annotations in generated code
message: '#^PHPDoc tag @(param|return) has invalid value (.|\n)+ expected TOKEN_IDENTIFIER at offset \d+$#'
path: %currentWorkingDirectory%/tests/App/Test/Codeception/_generated/AcceptanceTesterActions.php
message: '#^PHPDoc tag @(param|return) has invalid value (.|\n)+ expected type at offset \d+$#'
path: %currentWorkingDirectory%/project-base/tests/App/Test/Codeception/_generated/AcceptanceTesterActions.php
-
# Ignore annotations in generated code
message: '#^PHPDoc tag @throws with type .+ is not subtype of Throwable$#'
path: %currentWorkingDirectory%/tests/App/Test/Codeception/_generated/AcceptanceTesterActions.php
-
# In data fixtures, we often access persistent references using $this->getReference()
message: '#^Property (App|Shopsys)\\.+::\$.+ \((App|Shopsys)\\.+\) does not accept object\.$#'
path: %currentWorkingDirectory%/src/DataFixtures/*
-
# In tests, we often grab services using $container->get() or access persistent references using $this->getReference()
message: '#^Property (Shopsys|Tests)\\.+::\$.+ \(.+\) does not accept (object|object\|null)\.$#'
path: %currentWorkingDirectory%/tests/App/*
-
# In tests, there are helper methods for grabbing services using $container->get()
message: '#^Method .+::.+\(\) should return .+ but returns (object|object\|null)\.$#'
path: %currentWorkingDirectory%/tests/App/*
-
# Actually, we are setting an array item using "$array[] = $this->getReference()"
message: '#^Array \(array<.+>\) does not accept object\.$#'
path: %currentWorkingDirectory%/tests/App/Functional/Model/Product/ProductOnCurrentDomainFacadeCountDataTest.php
-
# Actually, we are setting an array item using "$array[] = $this->getReference()"
message: '#^Array \(array<.+>\) does not accept object\.$#'
path: %currentWorkingDirectory%/src/DataFixtures/Demo/ProductDataFixture.php
-
# We need to have undefined variable for testing purposes
message: '#^Undefined variable: \$undefined$#'
path: %currentWorkingDirectory%/src/Controller/Test/ErrorHandlerController.php
path: %currentWorkingDirectory%/project-base/tests/App/Test/Codeception/_generated/AcceptanceTesterActions.php
includes:
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
2 changes: 2 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
>
<php>
<env name="KERNEL_CLASS" value="App\Kernel" />
<env name="APP_ENV" value="test" />
<env name="APP_DEBUG" value="false" />
</php>

<testsuites>
Expand Down
Loading

0 comments on commit fb3fa6f

Please sign in to comment.