From 495b3bc34ea807f43fe81cdc7a69704792cdbb9c Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 13:25:07 +0200 Subject: [PATCH 01/10] Update to Symfony 2.7 LTS. --- composer.json | 2 +- composer.lock | 82 +++++++++++++++++++++++++++++---------------------- 2 files changed, 48 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 69940295..754858f9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "minimum-stability": "stable", "require": { "php": ">=5.4", - "symfony/symfony": "~2.6,>=2.6.6", + "symfony/symfony": "^2.7", "twig/extensions": "~1.0", "symfony/assetic-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", diff --git a/composer.lock b/composer.lock index 35ba2dc0..1893973b 100644 --- a/composer.lock +++ b/composer.lock @@ -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" ], - "hash": "331274e095487cdcc46fe21486b06bfb", + "hash": "cad14c3f0ab3334c1de2773a9791dd30", "packages": [ { "name": "beberlei/assert", @@ -1317,7 +1317,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phiamo/MopaBootstrapBundle/zipball/6df7486cd7181be4e4649e1c7303fc3041a37ae5", + "url": "https://api.github.com/repos/phiamo/MopaBootstrapBundle/zipball/0b467cf9e3de5b80cb7830dc758265204a5fcde5", "reference": "818b0f47ebd352559950e9a64431ff9472e8a9dd", "shasum": "" }, @@ -1616,29 +1616,36 @@ }, { "name": "sensio/distribution-bundle", - "version": "v3.0.8", + "version": "v3.0.28", "target-dir": "Sensio/Bundle/DistributionBundle", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "bc5e96bb4faf6bee7121085951d11b89488952f5" + "reference": "8175618b07793b9d43c3be931f3d8d4c14c9e866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/bc5e96bb4faf6bee7121085951d11b89488952f5", - "reference": "bc5e96bb4faf6bee7121085951d11b89488952f5", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/8175618b07793b9d43c3be931f3d8d4c14c9e866", + "reference": "8175618b07793b9d43c3be931f3d8d4c14c9e866", "shasum": "" }, "require": { "php": ">=5.3.3", "sensiolabs/security-checker": "~2.0", "symfony/class-loader": "~2.2", - "symfony/form": "~2.2", "symfony/framework-bundle": "~2.3", - "symfony/process": "~2.2", + "symfony/process": "~2.2" + }, + "require-dev": { + "symfony/form": "~2.2", "symfony/validator": "~2.2", "symfony/yaml": "~2.2" }, + "suggest": { + "symfony/form": "If you want to use the configurator", + "symfony/validator": "If you want to use the configurator", + "symfony/yaml": "If you want to use the configurator" + }, "type": "symfony-bundle", "extra": { "branch-alias": { @@ -1665,7 +1672,7 @@ "configuration", "distribution" ], - "time": "2014-11-03 21:16:34" + "time": "2015-06-01 15:04:20" }, { "name": "sensio/framework-extra-bundle", @@ -2257,25 +2264,26 @@ }, { "name": "symfony/symfony", - "version": "v2.6.6", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "48c9e835a877adfb023b8b6d033d9dd14f342b4b" + "reference": "9975b1eca3de4db792a2c3e4e16f676a4aadcd46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/48c9e835a877adfb023b8b6d033d9dd14f342b4b", - "reference": "48c9e835a877adfb023b8b6d033d9dd14f342b4b", + "url": "https://api.github.com/repos/symfony/symfony/zipball/9975b1eca3de4db792a2c3e4e16f676a4aadcd46", + "reference": "9975b1eca3de4db792a2c3e4e16f676a4aadcd46", "shasum": "" }, "require": { "doctrine/common": "~2.3", - "php": ">=5.3.3", + "php": ">=5.3.9", "psr/log": "~1.0", - "twig/twig": "~1.12,>=1.12.3" + "twig/twig": "~1.18" }, "replace": { + "symfony/asset": "self.version", "symfony/browser-kit": "self.version", "symfony/class-loader": "self.version", "symfony/config": "self.version", @@ -2299,7 +2307,6 @@ "symfony/monolog-bridge": "self.version", "symfony/options-resolver": "self.version", "symfony/process": "self.version", - "symfony/propel1-bridge": "self.version", "symfony/property-access": "self.version", "symfony/proxy-manager-bridge": "self.version", "symfony/routing": "self.version", @@ -2330,18 +2337,23 @@ "ircmaxell/password-compat": "~1.0", "monolog/monolog": "~1.11", "ocramius/proxy-manager": "~0.4|~1.0", - "propel/propel1": "~1.6", - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "self.version" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { - "Symfony\\": "src/" + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" }, "classmap": [ "src/Symfony/Component/HttpFoundation/Resources/stubs", @@ -2356,21 +2368,21 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "The Symfony PHP framework", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "framework" ], - "time": "2015-04-01 16:55:26" + "time": "2015-05-30 16:52:28" }, { "name": "twbs/bootstrap", @@ -2477,25 +2489,25 @@ }, { "name": "twig/twig", - "version": "v1.16.2", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" + "reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9f70492f44398e276d1b81c1b43adfe6751c7b7f", + "reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "1.18-dev" } }, "autoload": { @@ -2521,7 +2533,7 @@ }, { "name": "Twig Team", - "homepage": "https://github.com/fabpot/Twig/graphs/contributors", + "homepage": "http://twig.sensiolabs.org/contributors", "role": "Contributors" } ], @@ -2530,7 +2542,7 @@ "keywords": [ "templating" ], - "time": "2014-10-17 12:53:44" + "time": "2015-04-19 08:30:27" } ], "packages-dev": [ From 879ba3e340c47ed9d7cadb39a01cdd5b489da9f9 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 13:26:16 +0200 Subject: [PATCH 02/10] Disable reporting of E_USER_DEPRECATED errors triggered by Symfony. --- app/console | 2 +- app_dev.php.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/console b/app/console index 118fee25..ec53685c 100755 --- a/app/console +++ b/app/console @@ -17,7 +17,7 @@ $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('- && $env !== 'build'; if ($debug) { - Debug::enable(); + Debug::enable(~E_USER_DEPRECATED); } $kernel = new AppKernel($env, $debug); diff --git a/app_dev.php.dist b/app_dev.php.dist index 6355b73b..01590cd3 100644 --- a/app_dev.php.dist +++ b/app_dev.php.dist @@ -4,7 +4,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Debug\Debug; $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; -Debug::enable(); +Debug::enable(~E_USER_DEPRECATED); require_once __DIR__.'/../app/AppKernel.php'; From 5bb9736d4b701d64079457266d880147b1e3abac Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 13:27:06 +0200 Subject: [PATCH 03/10] Switch from AbstractType#setDefaultOptions() to #configureOptions(). --- .../Form/Type/AmendRegistrationAuthorityInformationType.php | 4 ++-- src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php | 4 ++-- src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/RevokeSecondFactorType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/SearchRaCandidatesType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/SendSmsChallengeType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/StartVettingProcedureType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/VerifyIdentityType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php | 4 ++-- .../StepupRa/RaBundle/Form/Type/VerifyYubikeyPublicIdType.php | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php index 441f07cf..1252967c 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/AmendRegistrationAuthorityInformationType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class AmendRegistrationAuthorityInformationType extends AbstractType { @@ -49,7 +49,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\AmendRegistrationAuthorityInformationCommand' diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php index f23eaf79..ef42e241 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\ButtonTypeInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class AnchorType extends AbstractType implements ButtonTypeInterface { @@ -36,7 +36,7 @@ public function getName() return 'anchor'; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'route' => null, diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php index dd093fe2..a46fc78b 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php @@ -21,7 +21,7 @@ use Surfnet\StepupRa\RaBundle\Form\Extension\RaRoleChoiceList; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class CreateRaType extends AbstractType { @@ -54,7 +54,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\AccreditCandidateCommand' diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php index 7a349f10..038c1aa3 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php @@ -21,7 +21,7 @@ use Surfnet\StepupRa\RaBundle\Form\Extension\InstitutionListingChoiceList; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class InstitutionSelectionType extends AbstractType { @@ -45,7 +45,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\SelectInstitutionCommand' diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/RevokeSecondFactorType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/RevokeSecondFactorType.php index 212333cf..7d84bfd0 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/RevokeSecondFactorType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/RevokeSecondFactorType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class RevokeSecondFactorType extends AbstractType { @@ -31,7 +31,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('identityId', 'hidden'); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\RevokeSecondFactorCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaCandidatesType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaCandidatesType.php index edb6afb3..c88a2c06 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaCandidatesType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaCandidatesType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class SearchRaCandidatesType extends AbstractType { @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\SearchRaCandidatesCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php index 584ff58f..2c829fff 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class SearchRaSecondFactorsType extends AbstractType { @@ -59,7 +59,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\SearchRaSecondFactorsCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/SendSmsChallengeType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/SendSmsChallengeType.php index 4b76afb9..3ef26d37 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/SendSmsChallengeType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/SendSmsChallengeType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class SendSmsChallengeType extends AbstractType { @@ -32,7 +32,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupBundle\Command\SendSmsChallengeCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/StartVettingProcedureType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/StartVettingProcedureType.php index 1226bccd..ad1362dc 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/StartVettingProcedureType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/StartVettingProcedureType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class StartVettingProcedureType extends AbstractType { @@ -44,7 +44,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\StartVettingProcedureCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyIdentityType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyIdentityType.php index 838b8197..03d343ff 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyIdentityType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyIdentityType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class VerifyIdentityType extends AbstractType { @@ -46,7 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\VerifyIdentityCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php index 5d74cc0e..00c19032 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyPhoneNumberType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class VerifyPhoneNumberType extends AbstractType { @@ -45,7 +45,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupBundle\Command\VerifyPossessionOfPhoneCommand', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyYubikeyPublicIdType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyYubikeyPublicIdType.php index cd3a4098..6f1a7b19 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyYubikeyPublicIdType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/VerifyYubikeyPublicIdType.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; class VerifyYubikeyPublicIdType extends AbstractType { @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'Surfnet\StepupRa\RaBundle\Command\VerifyYubikeyPublicIdCommand', From 0dbe315c59b4983c410d572cab470974a6e8cc15 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 14:09:18 +0200 Subject: [PATCH 04/10] Enable the PHP templating engine for compatibility with KnpPaginator. KnpPaginatorBundle relied on the PHP templating engine services, which were loaded in Symfony 2.6 and below, but not integrated with the framework when not enabled in config.yml:framework.templating.engines. --- app/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/config.yml b/app/config/config.yml index 3966b8d1..5514b0ad 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -15,7 +15,7 @@ framework: csrf_protection: ~ validation: { enable_annotations: true } templating: - engines: ['twig'] + engines: ['twig', 'php'] assets_version: %asset_version% default_locale: "%default_locale%" trusted_hosts: ~ From 790967292d7686841ac64a2700071dd39ae8a371 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 14:13:19 +0200 Subject: [PATCH 05/10] Switch to new framework assets configuration. --- app/config/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/config/config.yml b/app/config/config.yml index 5514b0ad..6f8e4f15 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -16,7 +16,8 @@ framework: validation: { enable_annotations: true } templating: engines: ['twig', 'php'] - assets_version: %asset_version% + assets: + version: %asset_version% default_locale: "%default_locale%" trusted_hosts: ~ trusted_proxies: %trusted_proxies% From 3b0df1027d55d97c67302fd5043c7974ec8797a3 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 14:13:42 +0200 Subject: [PATCH 06/10] Switch to new form choice list configuration. --- .../Form/Extension/InstitutionListingChoiceList.php | 6 +++--- .../RaBundle/Form/Extension/RaRoleChoiceList.php | 11 +++++------ .../StepupRa/RaBundle/Form/Type/CreateRaType.php | 3 ++- .../RaBundle/Form/Type/InstitutionSelectionType.php | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Extension/InstitutionListingChoiceList.php b/src/Surfnet/StepupRa/RaBundle/Form/Extension/InstitutionListingChoiceList.php index f5f28a18..3e1fdd4c 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Extension/InstitutionListingChoiceList.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Extension/InstitutionListingChoiceList.php @@ -20,7 +20,6 @@ use Surfnet\StepupMiddlewareClientBundle\Identity\Dto\InstitutionListing; use Surfnet\StepupMiddlewareClientBundle\Identity\Service\InstitutionListingService; -use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; class InstitutionListingChoiceList { @@ -38,7 +37,7 @@ public function __construct(InstitutionListingService $institutionListingService } /** - * @return SimpleChoiceList + * @return array */ public function create() { @@ -50,6 +49,7 @@ public function create() }, $listings); $selectOptions = array_combine($options, $options); - return new SimpleChoiceList($selectOptions); + + return $selectOptions; } } diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Extension/RaRoleChoiceList.php b/src/Surfnet/StepupRa/RaBundle/Form/Extension/RaRoleChoiceList.php index 696c7da3..d8d972b3 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Extension/RaRoleChoiceList.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Extension/RaRoleChoiceList.php @@ -18,22 +18,21 @@ namespace Surfnet\StepupRa\RaBundle\Form\Extension; -use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; - class RaRoleChoiceList { /** - * @return SimpleChoiceList + * @return array */ - public static function createChoiceList() + public static function create() { $choices = self::getChoices(); $labels = array_map(function ($choice) { return 'ra.form.extension.ra_role_choice.' . $choice; }, $choices); - $combined = array_combine($choices, $labels); - return new SimpleChoiceList($combined); + $combined = array_combine($labels, $choices); + + return $combined; } /** diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php index a46fc78b..eae4e06f 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php @@ -36,7 +36,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]) ->add('role', 'choice', [ 'label' => 'ra.management.form.create_ra.label.role', - 'choice_list' => RaRoleChoiceList::createChoiceList() + 'choices' => RaRoleChoiceList::create(), + 'choices_as_values' => true, ]) ->add('create_ra', 'submit', [ 'label' => 'ra.management.form.create_ra.label.create_ra', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php index 038c1aa3..be584197 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/InstitutionSelectionType.php @@ -36,7 +36,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('institution', 'choice', [ - 'choice_list' => $this->institutionListingChoiceList->create(), + 'choices' => $this->institutionListingChoiceList->create(), + 'choices_as_values' => true, 'label' => 'ra.form.ra_select_institution.label.institution', ]) ->add('select_and_apply', 'submit', [ From 663a0afd944f6b525ed72dcdd9f3f65d39eb1b21 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Tue, 2 Jun 2015 16:46:20 +0200 Subject: [PATCH 07/10] Include upgrade-related changes from Stepup bundles. --- composer.json | 4 ++-- composer.lock | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 754858f9..6bef0084 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ "jms/di-extra-bundle": "~1.4.0", "surfnet/stepup-middleware-client-bundle": "dev-develop", "simplesamlphp/saml2": "dev-master", - "surfnet/stepup-saml-bundle": "dev-develop", - "surfnet/stepup-bundle": "dev-develop", + "surfnet/stepup-saml-bundle": "dev-maintenance/symfony-2.7", + "surfnet/stepup-bundle": "dev-maintenance/symfony-2.7", "guzzlehttp/guzzle": "~4", "symfony/swiftmailer-bundle": "~2.3", "knplabs/knp-paginator-bundle": "~2.4" diff --git a/composer.lock b/composer.lock index 1893973b..2b5954d5 100644 --- a/composer.lock +++ b/composer.lock @@ -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" ], - "hash": "cad14c3f0ab3334c1de2773a9791dd30", + "hash": "9dd63646e36b99ba221de8216de8a2e6", "packages": [ { "name": "beberlei/assert", @@ -1884,16 +1884,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "dev-develop", + "version": "dev-maintenance/symfony-2.7", "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-bundle.git", - "reference": "f0d4419e8be9a8738809ae35b0e2f4c30ac683df" + "reference": "c1f4fd18712aed612fb908f53cea6fe7ef2a0831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/f0d4419e8be9a8738809ae35b0e2f4c30ac683df", - "reference": "f0d4419e8be9a8738809ae35b0e2f4c30ac683df", + "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/c1f4fd18712aed612fb908f53cea6fe7ef2a0831", + "reference": "c1f4fd18712aed612fb908f53cea6fe7ef2a0831", "shasum": "" }, "require": { @@ -1905,7 +1905,7 @@ "sensio/framework-extra-bundle": "~3", "symfony/config": "~2", "symfony/dependency-injection": "~2", - "symfony/form": "~2", + "symfony/form": "^2.7", "symfony/framework-bundle": "~2", "symfony/http-kernel": "~2", "symfony/twig-bridge": "~2", @@ -1932,7 +1932,7 @@ "suaas", "surfnet" ], - "time": "2015-06-01 15:00:25" + "time": "2015-06-02 13:04:33" }, { "name": "surfnet/stepup-middleware-client-bundle", @@ -1985,22 +1985,23 @@ }, { "name": "surfnet/stepup-saml-bundle", - "version": "dev-develop", + "version": "dev-maintenance/symfony-2.7", "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-saml-bundle.git", - "reference": "4f4d4d9d04b3d9b1e322ad4cc6579336ba932ed3" + "reference": "4e9457c627b2e01dde930f52d5bce0690179ba6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-saml-bundle/zipball/34db9134005e4e6ce42662f5d58a9d681e3c1968", - "reference": "4f4d4d9d04b3d9b1e322ad4cc6579336ba932ed3", + "url": "https://api.github.com/repos/SURFnet/Stepup-saml-bundle/zipball/4e9457c627b2e01dde930f52d5bce0690179ba6b", + "reference": "4e9457c627b2e01dde930f52d5bce0690179ba6b", "shasum": "" }, "require": { "ext-openssl": "*", "php": "~5.4", "simplesamlphp/saml2": "dev-master", + "symfony/dependency-injection": "^2.6", "symfony/framework-bundle": "~2.5" }, "require-dev": { @@ -2027,7 +2028,7 @@ "stepup", "surfnet" ], - "time": "2015-04-16 10:02:22" + "time": "2015-06-02 12:25:57" }, { "name": "swiftmailer/swiftmailer", From 9a202ad116d7460c57b5cb8475d2bddbd861ae99 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Wed, 3 Jun 2015 13:44:42 +0200 Subject: [PATCH 08/10] Update to latest Stepup bundle. --- app/Resources/views/base.html.twig | 2 +- composer.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 9dc163ce..99b6257f 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -49,7 +49,7 @@ {% if app.user %} - {% set locale_switcher = stepup_locale_switcher('ra_switch_locale', {'return-url': app.request.uri}) %} + {% set locale_switcher = stepup_locale_switcher(app.request.locale, 'ra_switch_locale', {'return-url': app.request.uri}) %} {{ form_start(locale_switcher, { attr: { class: 'form-inline' }}) }} {{ form_widget(locale_switcher.locale) }} {{ form_widget(locale_switcher.switch) }} diff --git a/composer.lock b/composer.lock index 2b5954d5..05c38995 100644 --- a/composer.lock +++ b/composer.lock @@ -1888,12 +1888,12 @@ "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-bundle.git", - "reference": "c1f4fd18712aed612fb908f53cea6fe7ef2a0831" + "reference": "5cce1b8bb5bc74955bdb8901dc93cd1fe41a2280" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/c1f4fd18712aed612fb908f53cea6fe7ef2a0831", - "reference": "c1f4fd18712aed612fb908f53cea6fe7ef2a0831", + "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/5cce1b8bb5bc74955bdb8901dc93cd1fe41a2280", + "reference": "5cce1b8bb5bc74955bdb8901dc93cd1fe41a2280", "shasum": "" }, "require": { @@ -1932,7 +1932,7 @@ "suaas", "surfnet" ], - "time": "2015-06-02 13:04:33" + "time": "2015-06-03 10:21:18" }, { "name": "surfnet/stepup-middleware-client-bundle", @@ -1944,7 +1944,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-Middleware-clientbundle/zipball/929b8a75042ac129d91eb691d773f4cf41081ec1", + "url": "https://api.github.com/repos/SURFnet/Stepup-Middleware-clientbundle/zipball/28d2bef9b51c4eb89b02d6850cff564b2764b5b5", "reference": "929b8a75042ac129d91eb691d773f4cf41081ec1", "shasum": "" }, From 890868f4f1c0f502e3fe4acea028d59042a4bf93 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Wed, 3 Jun 2015 17:12:38 +0200 Subject: [PATCH 09/10] Update to latest Stepup bundle. --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 3079293c..c97a5b0b 100644 --- a/composer.lock +++ b/composer.lock @@ -1888,12 +1888,12 @@ "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-bundle.git", - "reference": "5cce1b8bb5bc74955bdb8901dc93cd1fe41a2280" + "reference": "21801cbe361f246fede06fc9895107ca2b221d0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/aee5affb2bd06e877cf6ca32f9c298409413141a", - "reference": "5cce1b8bb5bc74955bdb8901dc93cd1fe41a2280", + "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/21801cbe361f246fede06fc9895107ca2b221d0d", + "reference": "21801cbe361f246fede06fc9895107ca2b221d0d", "shasum": "" }, "require": { @@ -1932,7 +1932,7 @@ "suaas", "surfnet" ], - "time": "2015-06-03 10:21:18" + "time": "2015-06-03 15:38:36" }, { "name": "surfnet/stepup-middleware-client-bundle", From 3cfff09301f531d611fa8714f4a1afb1254f02e5 Mon Sep 17 00:00:00 2001 From: Reinier Kip Date: Wed, 3 Jun 2015 18:32:38 +0200 Subject: [PATCH 10/10] Update Stepup bundles to dev-develop. --- composer.json | 4 ++-- composer.lock | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 6bef0084..754858f9 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ "jms/di-extra-bundle": "~1.4.0", "surfnet/stepup-middleware-client-bundle": "dev-develop", "simplesamlphp/saml2": "dev-master", - "surfnet/stepup-saml-bundle": "dev-maintenance/symfony-2.7", - "surfnet/stepup-bundle": "dev-maintenance/symfony-2.7", + "surfnet/stepup-saml-bundle": "dev-develop", + "surfnet/stepup-bundle": "dev-develop", "guzzlehttp/guzzle": "~4", "symfony/swiftmailer-bundle": "~2.3", "knplabs/knp-paginator-bundle": "~2.4" diff --git a/composer.lock b/composer.lock index c97a5b0b..0d9fc62e 100644 --- a/composer.lock +++ b/composer.lock @@ -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" ], - "hash": "9dd63646e36b99ba221de8216de8a2e6", + "hash": "cad14c3f0ab3334c1de2773a9791dd30", "packages": [ { "name": "beberlei/assert", @@ -1884,16 +1884,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "dev-maintenance/symfony-2.7", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-bundle.git", - "reference": "21801cbe361f246fede06fc9895107ca2b221d0d" + "reference": "543596b5a3fa294e89a2b47dc53d8ecceb21ce36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/21801cbe361f246fede06fc9895107ca2b221d0d", - "reference": "21801cbe361f246fede06fc9895107ca2b221d0d", + "url": "https://api.github.com/repos/SURFnet/Stepup-bundle/zipball/543596b5a3fa294e89a2b47dc53d8ecceb21ce36", + "reference": "543596b5a3fa294e89a2b47dc53d8ecceb21ce36", "shasum": "" }, "require": { @@ -1932,7 +1932,7 @@ "suaas", "surfnet" ], - "time": "2015-06-03 15:38:36" + "time": "2015-06-03 16:28:41" }, { "name": "surfnet/stepup-middleware-client-bundle", @@ -1985,16 +1985,16 @@ }, { "name": "surfnet/stepup-saml-bundle", - "version": "dev-maintenance/symfony-2.7", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/SURFnet/Stepup-saml-bundle.git", - "reference": "4e9457c627b2e01dde930f52d5bce0690179ba6b" + "reference": "410f74d707053162ff043f57fbc114ddfdb65cab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SURFnet/Stepup-saml-bundle/zipball/4e9457c627b2e01dde930f52d5bce0690179ba6b", - "reference": "4e9457c627b2e01dde930f52d5bce0690179ba6b", + "url": "https://api.github.com/repos/SURFnet/Stepup-saml-bundle/zipball/410f74d707053162ff043f57fbc114ddfdb65cab", + "reference": "410f74d707053162ff043f57fbc114ddfdb65cab", "shasum": "" }, "require": { @@ -2028,7 +2028,7 @@ "stepup", "surfnet" ], - "time": "2015-06-02 12:25:57" + "time": "2015-06-03 15:15:11" }, { "name": "swiftmailer/swiftmailer",