-
Notifications
You must be signed in to change notification settings - Fork 76
[WIP] Symfony 3 #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
[WIP] Symfony 3 #323
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
70a6f2f
Mark DynamicRouter#match() tests as legacy
wouterj 31230d8
Fix Symfony 3 compatibility
wouterj 2ac6f9c
upgrading packages
killerwolf 823296f
ExecutionContextInterface changes namespace
killerwolf 95d10a9
unused class
killerwolf d107b4c
wip
killerwolf 20fc093
symfony 2.3 requires php 5.3.3 at least
killerwolf c159d8f
keep BC with symfony 2.3
killerwolf 02f3039
inadvertently deleted from require-dev sonata-project/doctrine-phpcr-…
killerwolf 087f162
Fix symfony3 compatibility
killerwolf ebb0007
fix dev dependencies version requirements
killerwolf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony CMF package. | ||
* | ||
* (c) 2011-2015 Symfony CMF | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Cmf\Bundle\RoutingBundle\Util; | ||
|
||
final class Sf2CompatUtil | ||
{ | ||
private static $isAtLeastSymfony28; | ||
private static $formTypes = array( | ||
'text' => 'Symfony\Component\Form\Extension\Core\Type\TextType', | ||
'doctrine_phpcr_odm_tree' => 'Sonata\DoctrinePHPCRAdminBundle\Form\Type\TreeModelType', | ||
'sonata_type_immutable_array' => 'Sonata\CoreBundle\Form\Type\ImmutableArrayType', | ||
'sonata_type_collection' => 'Sonata\CoreBundle\Form\Type\CollectionType', | ||
'cmf_routing_route_type' => 'Symfony\Cmf\Bundle\RoutingBundle\Form\Type\RouteTypeType', | ||
); | ||
|
||
public static function registerFormType($name, $fqcn) | ||
{ | ||
self::$formTypes[$name] = $fqcn; | ||
} | ||
|
||
public static function getFormTypeName($name) | ||
{ | ||
if (!self::isAtLeastSymfony28()) { | ||
return $name; | ||
} | ||
|
||
if (!isset(self::$formTypes[$name])) { | ||
throw new \InvalidArgumentException(sprintf('Unknown form type "%s", please register the FQCN of this form type to the Sf2CompatUtil first.', $name)); | ||
} | ||
|
||
return self::$formTypes[$name]; | ||
} | ||
|
||
public static function isAtLeastSymfony28() | ||
{ | ||
if (null === self::$isAtLeastSymfony28) { | ||
self::$isAtLeastSymfony28 = method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix'); | ||
} | ||
|
||
return self::$isAtLeastSymfony28; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be removed. If we update this to
^1.1|^2.0
, I think we'll have Symfony 3 support.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be fixed