summaryrefslogtreecommitdiffstats
path: root/Http
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2.4' into 2.5Fabien Potencier2014-09-2215-50/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fixed CS [Process] fixed some volatile tests [HttpKernel] fixed a volatile test [HttpFoundation] fixed some volatile tests [Tests] PHPUnit Optimizations Use getPathname() instead of string casting to get BinaryFileReponse file path Conflicts: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php src/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php src/Symfony/Component/Process/Tests/AbstractProcessTest.php src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php src/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php src/Symfony/Component/Validator/Constraints/ChoiceValidator.php src/Symfony/Component/Validator/Constraints/CollectionValidator.php src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php src/Symfony/Component/Validator/Tests/ValidationVisitorTest.php src/Symfony/Component/Yaml/Parser.php
| * Merge branch '2.3' into 2.4Fabien Potencier2014-09-2215-50/+51
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed CS [Process] fixed some volatile tests [HttpKernel] fixed a volatile test [HttpFoundation] fixed some volatile tests Use getPathname() instead of string casting to get BinaryFileReponse file path Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php src/Symfony/Component/ClassLoader/Tests/ApcUniversalClassLoaderTest.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php src/Symfony/Component/Console/Application.php src/Symfony/Component/Console/Tests/ApplicationTest.php src/Symfony/Component/Filesystem/Exception/IOException.php src/Symfony/Component/Form/Extension/Templating/TemplatingExtension.php src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php src/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php src/Symfony/Component/PropertyAccess/PropertyAccessor.php src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Validator/Constraints/CollectionValidator.php src/Symfony/Component/Validator/Tests/ExecutionContextTest.php
| | * fixed CSFabien Potencier2014-09-222-3/+3
| | |
* | | Merge branch '2.4' into 2.5Fabien Potencier2014-07-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: Update validators.eu.xlf fixed CS remove unused imports [Routing] simplify the XML schema file Unify null comparisons [EventDispatcher] don't count empty listeners [Process] Fix unit tests in sigchild environment [Process] fix signal handling in wait() [BrowserKit] refactor code and fix unquoted regex Fixed server HTTP_HOST port uri conversion [MonologBridge] fixed Console handler priorities Bring code into standard [Process] Add test to verify fix for issue #11421 [Process] Fixes issue #11421 [DependencyInjection] Pass a Scope instance instead of a scope name. Conflicts: src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php
| * | Merge branch '2.3' into 2.4Fabien Potencier2014-07-281-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: Update validators.eu.xlf fixed CS remove unused imports Unify null comparisons [EventDispatcher] don't count empty listeners [Process] Fix unit tests in sigchild environment [Process] fix signal handling in wait() [BrowserKit] refactor code and fix unquoted regex Fixed server HTTP_HOST port uri conversion Bring code into standard [Process] Add test to verify fix for issue #11421 [Process] Fixes issue #11421 [DependencyInjection] Pass a Scope instance instead of a scope name. Conflicts: src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
| | * Unify null comparisonsWouterJ2014-07-261-1/+1
| | |
* | | [Security] removed an unused parameter in some private methodsv2.5.0-RC1v2.5.0Issei.M2014-05-171-4/+4
| | |
* | | Merge branch '2.4'v2.5.0-BETA2Fabien Potencier2014-04-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: bumped Symfony version to 2.4.5 updated VERSION for 2.4.4 updated CHANGELOG for 2.4.4 bumped Symfony version to 2.3.14 updated VERSION for 2.3.13 update CONTRIBUTORS for 2.3.13 updated CHANGELOG for 2.3.13 Updated Serbian validation translation [Console] Fixed the rendering of exceptions on HHVM with a terminal width [WebProfilerBundle ] Fixed an edge case on WDT loading [Security] removed $csrfTokenManager type hint from SimpleFormAuthenticationListener constructor argument fixed typo [Process] Disable TTY mode on Windows platform [Validator] added missing ANNOTATION config to @Target annotation [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator. Conflicts: src/Symfony/Component/HttpKernel/Kernel.php
| * | [Security] removed $csrfTokenManager type hint from ↵v2.4.4Choong Wei Tjeng2014-04-251-1/+1
| | | | | | | | | | | | SimpleFormAuthenticationListener constructor argument
* | | Merge branch '2.4'Fabien Potencier2014-04-222-21/+43
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fix docblock Fixed incompatibility of x509 auth with nginx [Process] Setting STDIN while running should not be possible [Validator] slovenian translation updated [FrameworkBundle] improve English in RouterMatchCommand [Validator] Updated Hungarian translations [Doctrine Bridge] simplify session handler by using main connection [Validator] Fixed typos in German translation [Validator] Completed French translations [Validator] Completed German translations [Validator] Completed Luxembourgish translations
| * | Merge branch '2.3' into 2.4Fabien Potencier2014-04-222-21/+43
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fix docblock Fixed incompatibility of x509 auth with nginx [Process] Setting STDIN while running should not be possible [FrameworkBundle] improve English in RouterMatchCommand [Doctrine Bridge] simplify session handler by using main connection Conflicts: src/Symfony/Component/Process/Tests/AbstractProcessTest.php
| | * Fixed incompatibility of x509 auth with nginxalcaeus2014-04-221-3/+10
| | |
* | | Merge branch '2.4'Fabien Potencier2014-04-181-1/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: Little correction for case 'ar' No need to use mb functions here Fix doc-blocks Fix doc blocks [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite) [Finder] Marked test skipped when ftp stream wrapper is not available Conflicts: src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php
| * | Fix doc-blocksRomain Neutron2014-04-181-2/+2
| | |
| * | minor #10738 [2.4] Fix doc blocks (romainneutron)Fabien Potencier2014-04-181-2/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the 2.4 branch. Discussion ---------- [2.4] Fix doc blocks | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT this follows #10737 Commits ------- c01915d Fix doc blocks
| | * | Fix doc blocksRomain Neutron2014-04-181-2/+5
| | | |
* | | | Merge branch '2.4'Fabien Potencier2014-04-182-3/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: unified return null usages [Validator] added Japanese translation Textarea value should default to empty string instead of null. Fix doc blocks [Process] Fix #10681, process are failing on Windows Server 2003 updated doc [Security] fix DBAL connection typehint [HttpFoundation] status 201 is allowed to have a body unified return null usages Conflicts: src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
| * | | Merge branch '2.3' into 2.4Fabien Potencier2014-04-182-3/+1
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: Textarea value should default to empty string instead of null. Fix doc blocks [Process] Fix #10681, process are failing on Windows Server 2003 [Security] fix DBAL connection typehint [HttpFoundation] status 201 is allowed to have a body unified return null usages Conflicts: src/Symfony/Component/Console/Helper/DescriptorHelper.php src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php
| | * minor #10717 unified return null usages (fabpot)Fabien Potencier2014-04-182-3/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the 2.3 branch. Discussion ---------- unified return null usages | Q | A | ------------- | --- | License | MIT This PR unifies the way we return `null` from a function or method: * always use `return;` instead of `return null;` (the current code base uses both); * never use `return;` at the end of a function/method. Commits ------- d1d569b unified return null usages
| | | * unified return null usagesFabien Potencier2014-04-162-3/+1
| | | |
* | | | Merge branch '2.4'Fabien Potencier2014-04-164-4/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fixed types in phpdocs fixed types in phpdocs Conflicts: src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php src/Symfony/Component/Serializer/Encoder/JsonEncoder.php src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php src/Symfony/Component/Validator/Mapping/ClassMetadata.php src/Symfony/Component/Validator/Mapping/ElementMetadata.php src/Symfony/Component/Validator/Mapping/MemberMetadata.php src/Symfony/Component/Validator/MetadataFactoryInterface.php
| * | | Merge branch '2.3' into 2.4Fabien Potencier2014-04-165-5/+5
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed types in phpdocs Conflicts: src/Symfony/Bridge/Twig/TwigEngine.php src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php src/Symfony/Component/Filesystem/Tests/FilesystemTest.php src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php src/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php src/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php src/Symfony/Component/Serializer/Encoder/XmlEncoder.php src/Symfony/Component/Stopwatch/StopwatchEvent.php src/Symfony/Component/Templating/PhpEngine.php
| | * | fixed types in phpdocsFabien Potencier2014-04-165-5/+5
| | |/
* | | Merge branch '2.4'Fabien Potencier2014-04-1613-20/+20
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: made types consistent with those defined in Hack made {@inheritdoc} annotations consistent across the board made {@inheritdoc} annotations consistent across the board fixed types in phpdocs [Debug] Fixed ClassNotFoundFatalErrorHandler on windows. made phpdoc types consistent with those defined in Hack Add support Thai translations [Validator] Add missing czech translations made types consistent with those defined in Hack removed extra/unsupported arguments [HttpKernel] fixed an error message [TwigBundle] removed undefined argument [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. Conflicts: src/Symfony/Component/Console/Helper/TableHelper.php src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php src/Symfony/Component/Form/FormError.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/Process/ProcessPipes.php src/Symfony/Component/PropertyAccess/PropertyAccessor.php src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php src/Symfony/Component/Translation/Dumper/FileDumper.php src/Symfony/Component/Validator/ConstraintViolation.php src/Symfony/Component/Validator/Constraints/EmailValidator.php src/Symfony/Component/Validator/ExecutionContextInterface.php src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php
| * | made {@inheritdoc} annotations consistent across the boardFabien Potencier2014-04-161-2/+2
| | |
| * | Merge branch '2.3' into 2.4Fabien Potencier2014-04-1612-18/+18
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: made {@inheritdoc} annotations consistent across the board fixed types in phpdocs made phpdoc types consistent with those defined in Hack Add support Thai translations made types consistent with those defined in Hack removed extra/unsupported arguments [HttpKernel] fixed an error message [TwigBundle] removed undefined argument [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. Conflicts: src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Console/Helper/DescriptorHelper.php src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php src/Symfony/Component/HttpFoundation/Response.php src/Symfony/Component/HttpFoundation/StreamedResponse.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php src/Symfony/Component/Stopwatch/StopwatchPeriod.php src/Symfony/Component/Translation/TranslatorInterface.php src/Symfony/Component/Validator/ConstraintValidatorFactory.php
| | * made {@inheritdoc} annotations consistent across the boardFabien Potencier2014-04-1610-13/+13
| | |
| | * made phpdoc types consistent with those defined in HackFabien Potencier2014-04-153-4/+4
| | |
| | * made types consistent with those defined in HackFabien Potencier2014-04-131-1/+1
| | |
* | | Merge branch '2.4'Fabien Potencier2014-03-262-7/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: (52 commits) Fix #8205 : Deprecate file mode update when calling dumpFile Fix #10437: Catch exceptions when reloading a no-cache request Fix libxml_use_internal_errors and libxml_disable_entity_loader usage removed ini check to make uploadedfile work on gae Update OptionsResolver.php fixed comment in forms.xml file Clean KernelInterface docblocks Cast the group name as a string Fixed doc of InitAclCommand [Form] Fix "Array was modified outside object" in ResizeFormListener. Fix IBAN validator [Process] Remove unreachable code + avoid skipping tests in sigchild environment Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute Added travis_retry to .travis.yml [Process] fix some typos and refactor some code [Process] Fix unit tests in sigchild disabled environment [Process] Trow exceptions in case a Process method is supposed to be called after termination fixed typo [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started [Process] Fix escaping on Windows ... Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php src/Symfony/Component/Process/Process.php src/Symfony/Component/Process/ProcessPipes.php src/Symfony/Component/Process/Tests/AbstractProcessTest.php
| * | Merge branch '2.3' into 2.4v2.4.3Fabien Potencier2014-03-261-3/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: (34 commits) Fix #8205 : Deprecate file mode update when calling dumpFile Fix #10437: Catch exceptions when reloading a no-cache request Fix libxml_use_internal_errors and libxml_disable_entity_loader usage removed ini check to make uploadedfile work on gae Update OptionsResolver.php fixed comment in forms.xml file Clean KernelInterface docblocks Cast the group name as a string Fixed doc of InitAclCommand [Form] Fix "Array was modified outside object" in ResizeFormListener. Fix IBAN validator [Process] Remove unreachable code + avoid skipping tests in sigchild environment Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute Added travis_retry to .travis.yml [Process] fix some typos and refactor some code [Process] Fix unit tests in sigchild disabled environment [Process] Trow exceptions in case a Process method is supposed to be called after termination fixed typo [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started [Process] Fix escaping on Windows ... Conflicts: src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/Process/Process.php
| | * Update DefaultAuthenticationSuccessHandler.phpureimers2014-03-141-3/+0
| | |
| * | Use more accurate variable nameGrégoire Pineau2014-03-091-4/+4
| | |
* | | [Security] simplified codeFabien Potencier2014-02-221-17/+1
| | |
* | | use core StringUtils to compare hashesWing2014-02-221-10/+2
| | |
* | | Merge branch '2.4'Fabien Potencier2014-02-112-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fixed various inconsistencies reduced recursion when building DumperPrefixCollection renamed variables - making next change more readable removing dead code. [ExpressionLanguage] added some tests for the built-in constant() function [ExpressionLanguage] added some documentation about functions [DomCrawler] Fixed filterXPath() chaining [DomCrawler] Fixed incorrect handling of image inputs
| * | Merge branch '2.3' into 2.4v2.4.2Fabien Potencier2014-02-112-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed various inconsistencies reduced recursion when building DumperPrefixCollection renamed variables - making next change more readable removing dead code. [DomCrawler] Fixed filterXPath() chaining [DomCrawler] Fixed incorrect handling of image inputs Conflicts: src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
* | | Merge branch '2.4'Fabien Potencier2014-01-071-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: udpated LICENSE year update year on licenses rundown and typo fix [Process] Fix #9861 : Revert TTY mode [Form] Update minimal requirement in composer.json Fix Empty translations with Qt files [Console] Fixed command name guessing if an alternative is an alias. Update UPGRADE-2.3.md to account for #9388 [WebProfilerBundle] Fixed profiler toolbar icons for XHTML. [BrowserKit] Throw exception on invalid cookie expiration timestamp [Propel1Bridge][ModelChoiceList] add exception message for invalid classes
| * | udpated LICENSE yearFabien Potencier2014-01-071-1/+1
| | |
* | | Merge branch '2.4'Fabien Potencier2014-01-015-5/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * 2.4: removed unneeded use statements [DoctrineBridge] Fixed an issue with DoctrineParserCache removed unneeded use statements Prepend Child Bundle paths before the parent [Routing] add unit tests for Symfony\Component\Routing\RequestContext class
| * | Merge branch '2.3' into 2.4v2.4.1Fabien Potencier2014-01-015-5/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: removed unneeded use statements Prepend Child Bundle paths before the parent [Routing] add unit tests for Symfony\Component\Routing\RequestContext class Conflicts: src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php src/Symfony/Component/Validator/ConstraintValidatorFactory.php
| | * removed unneeded use statementsFabien Potencier2014-01-015-5/+0
| | |
* | | Merge branch '2.4'Fabien Potencier2013-12-312-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: [Security] fixed pre/post authentication checks fixed missing use statements Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term. Fixed CSS [Intl] Added round support for ROUND_CEILING, ROUND_FLOOR, ROUND_DOWN, ROUND_UP [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class addressed == -> === suggestion Fixed #9020 - Added support for collections in service#parameters fixes PSR-0 issues in tests adjusted behavior to always copy override on url files Skips test that need full lib-intl.
| * | Merge branch '2.3' into 2.4Fabien Potencier2013-12-312-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: [Security] fixed pre/post authentication checks Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term. Fixed CSS [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class addressed == -> === suggestion Fixed #9020 - Added support for collections in service#parameters fixes PSR-0 issues in tests adjusted behavior to always copy override on url files Skips test that need full lib-intl. Conflicts: src/Symfony/Component/Security/Acl/Tests/Permission/MaskBuilderTest.php src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememerMeTokenTest.php src/Symfony/Component/Security/Core/Tests/User/AccountCheckerTest.php src/Symfony/Component/Security/Core/Tests/User/InMemoryProviderTest.php src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememberMeTokenTest.php src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememerMeTokenTest.php src/Symfony/Component/Security/Tests/Core/User/AccountCheckerTest.php src/Symfony/Component/Security/Tests/Core/User/InMemoryProviderTest.php src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php src/Symfony/Component/Security/Tests/Core/User/UserCheckerTest.php
* | | Merge branch '2.4'Fabien Potencier2013-12-291-57/+56
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: [Security] simplified some unit tests [Security] made code easier to understand, added some missing unit tests [DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop) [DomCrawler] Fixed creating form objects from form nodes. disabled php.ini changes when using HHVM in .travis.yml [Process] fixed HHVM support Add support for HHVM in the getting of the PHP executable [Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
| * | Merge branch '2.3' into 2.4Fabien Potencier2013-12-291-57/+56
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: [Security] made code easier to understand, added some missing unit tests [DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop) [DomCrawler] Fixed creating form objects from form nodes. disabled php.ini changes when using HHVM in .travis.yml [Process] fixed HHVM support Add support for HHVM in the getting of the PHP executable [Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
| | * [Security] made code easier to understand, added some missing unit testsFabien Potencier2013-12-291-75/+58
| | |
| | * [Security] fixed error 500 instead of 403 if previous exception is provided ↵Tomasz Szymczyk2013-12-281-51/+67
| | | | | | | | | | | | to AccessDeniedException
* | | Merge branch '2.4'Fabien Potencier2013-12-282-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fixed typos Fixed deprecated method calls Add testing against HHVM at Travis-CI Fixed typo Fixed typo Fixed typo fixed acronyms [Validator] Fixed IBAN validator with 0750447346 value Conflicts: src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
| * | Merge branch '2.3' into 2.4Fabien Potencier2013-12-282-3/+3
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed typos Fixed deprecated method calls Add testing against HHVM at Travis-CI Fixed typo Fixed typo fixed acronyms [Validator] Fixed IBAN validator with 0750447346 value Conflicts: src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
| | * fixed acronymsFabien Potencier2013-12-282-3/+3
| | |
* | | Merge branch '2.4'Fabien Potencier2013-12-281-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: fixed CS fixed a typo fixed CS for lambdas [Yaml] fixed some license headers Fixes message value for objects Check for hour, minute & second validity avoid tables to have apparently long blank line breaks and be too far appart for long nested array params fixed various typos [Filesystem] Fixed mirror for symlinks [Validator] Removed duplicated test for IBAN in data provider
| * | Merge branch '2.3' into 2.4Fabien Potencier2013-12-281-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed a typo fixed CS for lambdas [Yaml] fixed some license headers Fixes message value for objects Check for hour, minute & second validity fixed various typos [Filesystem] Fixed mirror for symlinks [Validator] Removed duplicated test for IBAN in data provider Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php src/Symfony/Component/Console/Application.php src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php src/Symfony/Component/Filesystem/Tests/FilesystemTest.php src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
| | * fixed various typosFabien Potencier2013-12-271-2/+2
| | |
* | | Merge branch '2.4'Fabien Potencier2013-12-261-3/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: (44 commits) [FrameworkBundle] Add missing license headers Fix parent serialization of user object [DependencyInjection] fixed typo added condition to avoid skipping tests on JSON_PRETTY support add memcache, memcached, and mongodb extensions to run skipped tests [DependencyInjection] Fixed support for backslashes in service ids. fix #9356 [Security] Logger should manipulate the user reloaded from provider [FrameworkBundle] Added extra details in XMLDescriptor to improve container description fixed CS Crawler default namespace fix [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases [HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4) fix 5528 let ArrayNode::normalizeValue respect order of value array provided fix #7243 allow 0 as arraynode name Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes #9403). BinaryFileResponse should also return 416 or 200 on some range-requets fix deprecated usage and clarify constructor defaults for number formatter Bumping dependency to ProxyManager to allow testing against the new 0.5.x branch changes Do normalization on tag options bumped Symfony version to 2.3.9 ...
| * | Merge branch '2.3' into 2.4Fabien Potencier2013-12-261-3/+4
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: (31 commits) Fix parent serialization of user object [DependencyInjection] fixed typo add memcache, memcached, and mongodb extensions to run skipped tests [DependencyInjection] Fixed support for backslashes in service ids. fix #9356 [Security] Logger should manipulate the user reloaded from provider [BrowserKit] fixes #8311 CookieJar is totally ignorant of RFC 6265 edge cases [HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4) fix 5528 let ArrayNode::normalizeValue respect order of value array provided fix #7243 allow 0 as arraynode name Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes #9403). BinaryFileResponse should also return 416 or 200 on some range-requets Do normalization on tag options bumped Symfony version to 2.3.9 updated VERSION for 2.3.8 update CONTRIBUTORS for 2.3.8 updated CHANGELOG for 2.3.8 [Filesystem] Changed the mode for a target file in copy() to be write only. [Console] fixed CS fixed TableHelper when cell value has new line Improved and fixed grammar mistakes. Added pluralized messages ... Conflicts: src/Symfony/Component/BrowserKit/Cookie.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Routing/Matcher/UrlMatcher.php
| | * fix #9356 [Security] Logger should manipulate the user reloaded from providerMatthieu Auger2013-12-201-3/+4
| | |
* | | minor #9594 [Security] Fixed typos/CS/PHPDoc (pborreli)Fabien Potencier2013-11-261-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- [Security] Fixed typos/CS/PHPDoc Commits ------- e1110de Fixed typos/CS/PHPDoc
| * | | Fixed typos/CS/PHPDocPascal Borreli2013-11-242-5/+5
| | | |
* | | | Merge branch '2.4'Fabien Potencier2013-11-262-2/+2
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.4: [HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object. Fixed mistake in upgrade docu bumped Symfony version to 2.4.0 updated VERSION for 2.4.0-RC1 updated CHANGELOG for 2.4.0-RC1 Container::camelize also takes backslashes into consideration fixed typos fixed @expectedException class names Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it. fixed some typos fixed @expectedException class names Typo and better wording for german validator translation
| * | | Merge branch '2.3' into 2.4v2.4.0Fabien Potencier2013-11-262-2/+2
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | | | | | | | | | | | | | * 2.3: Fixed mistake in upgrade docu Container::camelize also takes backslashes into consideration fixed typos fixed @expectedException class names fixed some typos fixed @expectedException class names Typo and better wording for german validator translation
* | | updated version to 2.5Fabien Potencier2013-11-242-2/+2
|/ /
* | minor #9487 unify constructor initialization style throughout symfony (Tobion)Fabien Potencier2013-11-224-33/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- unify constructor initialization style throughout symfony | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | n/a In almost all classes symfony uses property initialization when the value is static. Constructor initialization is only used for things that actually have logic, like passed parameters or dynamic values. IMHO it makes the code much more readable because property definition, phpdoc and default value is in one place. Also one can easily see what the constructor implements for logic like overridden default value of a parent class. Otherwise the real deal is just hidden behind 10 property initializations. One more advantage is that it requires less code. As you can see, the code was almost cut in half (210 additions and 395 deletions). I unified it accordingly across symfony. Sometimes it was [not even consistent within one class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Definition/BaseNode.php#L32). At the same time I recognized some errors like missing parent constructor call, or undefined properties or private properties that are not even used. I then realized that a few Kernel tests were not passing because they were deeply implementation specific like modifying booted flag with a custom `KernelForTest->setIsBooted();`. I improved and refactored the kernel tests in the __second commit__. __Third commit__ unifies short ternary operator, e.g. `$foo ?: new Foo()`. __Forth commit__ unifies missing parentheses, e.g. `new Foo()`. Commits ------- 077a089 unify missing parentheses 2888594 unify short ternary operator 2a9daff [HttpKernel] better written kernel tests 111ac18 unify constructor initialization style throughout symfony
| * | unify missing parenthesesTobias Schultze2013-11-143-31/+31
| | |
| * | unify constructor initialization style throughout symfonyTobias Schultze2013-11-111-2/+1
| | |
* | | [Security] Added a missing field in SimpleAuthenticationHandlerJakub Zalas2013-11-212-0/+193
|/ /
* | minor #9427 adjust doctrine dependencies (Tobion)Fabien Potencier2013-11-092-19/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- adjust doctrine dependencies | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9384, #9385 | License | MIT | Doc PR | - I went through all components/bundles/bridges in symfony and searched for doctrine dependencies. Then looked if it only requires a subset (annotations instead of common for example). Commits ------- 7366901 adjust doctrine dependencies
| * | adjust doctrine dependenciesTobias Schultze2013-11-072-19/+16
| | |
* | | Fix bug with variable named context to securityContext in ↵mieszko42013-11-051-1/+1
|/ / | | | | | | SimplePreAuthenticationListener->handle function
* | Merge branch '2.3'Fabien Potencier2013-10-301-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed CS fixed CS [HttpKernel] fixed memory limit display in MemoryDataCollector Fixed the error handling when decoding invalid XML to avoid a Warning [Form] Fixed: The "data" option is taken into account even if it is NULL [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive Conflicts: src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
| * Merge branch '2.2' into 2.3v2.3.7Fabien Potencier2013-10-301-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.2: fixed CS Fixed the error handling when decoding invalid XML to avoid a Warning [Form] Fixed: The "data" option is taken into account even if it is NULL [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive Conflicts: src/Symfony/Component/Form/Extension/Core/Type/FormType.php
| | * fixed CSv2.2.10Fabien Potencier2013-10-301-1/+1
| | |
* | | Merge branch '2.3'Fabien Potencier2013-10-181-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | * 2.3: [DoctrineBridge] Added type check to prevent calling clear() on arrays [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty Fix docblock typo
| * | Merge branch '2.2' into 2.3Fabien Potencier2013-10-181-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | * 2.2: [DoctrineBridge] Added type check to prevent calling clear() on arrays [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty Fix docblock typo Conflicts: src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
| | * Fix docblock typoAdrien Brault2013-10-171-1/+1
| | |
| * | Merge branch '2.2' into 2.3Fabien Potencier2013-10-171-1/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.2: [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays Removed unused use statements. Make usleep longer and simplify assertions Added japanese translation resource for security component. [Yaml] Fixed the escaping of strings starting with a dash when dumping Fix in ChainLoader.php fixed wrong started states
| | * Removed unused use statements.Hugo Hamon2013-10-161-1/+0
| | |
* | | Removed dead code (unused use statements).Hugo Hamon2013-10-161-1/+0
| | |
* | | [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and ↵v2.4.0-BETA1Bernhard Schussek2013-10-073-24/+54
| | | | | | | | | | | | TokenGenerator
* | | Merge branch '2.3'Fabien Potencier2013-10-011-1/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: Fix: duplicate usage of Symfony\Component\HttpFoundation\Response [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3) Revert "merged branch Tobion/flattenexception (PR #9111)" [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied Conflicts: src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
| * | Merge branch '2.2' into 2.3Fabien Potencier2013-10-011-1/+0
| |\ \ | | |/ | | | | | | | | | * 2.2: Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
| | * Fix: duplicate usage of Symfony\Component\HttpFoundation\Responsesimpson2013-10-011-1/+0
| | |
* | | feature#8957 [HttpFoundation] added a way to override the Request class (fabpot)Fabien Potencier2013-10-011-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- [HttpFoundation] added a way to override the Request class | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7461, #7453 | License | MIT | Doc PR | symfony/symfony-docs#3021 This is an alternative implementation for #7461. I've also reverted #7381 and #7390 as these changes are not needed anymore. Todo: - [ ] add some tests Commits ------- 464439d [HttpFoundation] added a way to override the Request class
| * | | [HttpFoundation] added a way to override the Request classFabien Potencier2013-09-301-1/+1
| | | |
* | | | feature#6554 [Security] Added Security\Csrf sub-component with better token ↵Fabien Potencier2013-09-304-25/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generation (bschussek) This PR was merged into the master branch. Discussion ---------- [Security] Added Security\Csrf sub-component with better token generation | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | TODO **Update September 27, 2013** This PR simplifies the CSRF mechanism to generate completely random tokens. A random token is generated once per ~~intention~~ token ID and then stored in the session. Tokens are valid until the session expires. Since the CSRF token generator depends on `StringUtils` and `SecureRandom` from Security\Core, and since Security\Http currently depends on the Form component for token generation, I decided to add a new Security\Csrf sub-component that contains the improved CSRF token generator. Consequences: * Security\Http now depends on Security\Csrf instead of Form * Form now optionally depends on Security\Csrf * The configuration for the "security.secure_random" service and the "security.csrf.*" services was moved to FrameworkBundle to guarantee BC In the new Security\Csrf sub-component, I tried to improve the naming where I could do so without breaking BC: * CSRF "providers" are now called "token generators" * CSRF "intentions" are now called "token IDs", because that's really what they are ##### TODO - [ ] The documentation needs to be checked for references to the configuration of the application secret. Remarks that the secret is used for CSRF protection need to be removed. - [ ] Add aliases "csrf_token_generator" and "csrf_token_id" for "csrf_provider" and "intention" in the SecurityBundle configuration - [x] Make sure `SecureRandom` never blocks for `CsrfTokenGenerator` Commits ------- 7f02304 [Security] Added missing PHPDoc tag 2e04e32 Updated Composer dependencies to require the Security\Csrf component where necessary bf85e83 [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component 2048cf6 [Form] Deprecated the CSRF implementation and added an optional dependency to the Security CSRF sub-component instead 85d4959 [Security] Changed Security HTTP sub-component to depend on CSRF sub-component instead of Form 1bf1640 [Security] Added CSRF sub-component
| * | | | Updated Composer dependencies to require the Security\Csrf component where ↵Bernhard Schussek2013-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | necessary
| * | | | [Security] Changed Security HTTP sub-component to depend on CSRF ↵Bernhard Schussek2013-09-274-25/+26
| | | | | | | | | | | | | | | | | | | | sub-component instead of Form
* | | | | Merge branch '2.3'Fabien Potencier2013-09-2918-12/+84
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: fixed Client when using the terminable event Fix problem with Windows file links (backslash in JavaScript string) [Security] fixed wrong phpdoc [DependencyInjection] Prevented inlining of lazy loaded private service definitions. [Routing] removed extra argument [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted). Added doc comments Conflicts: src/Symfony/Component/Routing/Router.php src/Symfony/Component/Security/Http/Firewall.php
| * | | Merge branch '2.2' into 2.3Fabien Potencier2013-09-2918-12/+84
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.2: fixed Client when using the terminable event Fix problem with Windows file links (backslash in JavaScript string) [Security] fixed wrong phpdoc [Routing] removed extra argument [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted). Added doc comments Conflicts: src/Symfony/Component/HttpFoundation/Request.php
| | * | [Security] fixed wrong phpdocFabien Potencier2013-09-271-3/+1
| | | |
| | * | Added doc commentsPiotr Antosik2013-09-1918-10/+84
| | | |
* | | | Merge branch '2.3'Fabien Potencier2013-09-222-5/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.3: [Locale] added support for the position argument to NumberFormatter::parse() [Locale] added some more stubs for the number formatter [Yaml] fixed typo [Yaml] fixed a test on PHP < 5.4 [DomCrawler]Crawler guess charset from html fixed PHP 5.3 compatibility [Yaml] reverted previous merge partially (refs #8897) [Security] remove unused logger [Security] fix typo [Yaml] Fixed filename in the ParseException message
| * | | Merge branch '2.2' into 2.3Fabien Potencier2013-09-222-5/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.2: [Locale] added support for the position argument to NumberFormatter::parse() [Locale] added some more stubs for the number formatter [Yaml] fixed typo [Yaml] fixed a test on PHP < 5.4 [DomCrawler]Crawler guess charset from html fixed PHP 5.3 compatibility [Yaml] reverted previous merge partially (refs #8897) [Security] remove unused logger [Security] fix typo [Yaml] Fixed filename in the ParseException message Conflicts: src/Symfony/Component/Console/Input/InputDefinition.php src/Symfony/Component/Locale/Stub/StubNumberFormatter.php src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
| | * | merged branch Tobion/security-fix-typo (PR #9069)v2.2.8v2.2.7Fabien Potencier2013-09-192-5/+2
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the 2.2 branch. Discussion ---------- [Security] fix typo and remove unused logger | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Commits ------- a33cc51 [Security] remove unused logger 62de9c1 [Security] fix typo
| | | * | [Security] remove unused loggerTobias Schultze2013-09-181-4/+1
| | | | |
| | | * | [Security] fix typoTobias Schultze2013-09-181-1/+1
| | | | |
* | | | | merged branch fabpot/expression-engine (PR #8913)Fabien Potencier2013-09-191-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- New Component: Expression Language | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8850, #7352 | License | MIT | Doc PR | not yet TODO: - [ ] write documentation - [x] add tests for the new component - [x] implement expression support for access rules in the security component - [x] find a better character/convention for expressions in the YAML format - [x] check the performance of the evaluation mode - [x] better error messages in the evaluation mode - [x] add support in the Routing - [x] add support in the Validator The ExpressionLanguage component provides an engine that can compile and evaluate expressions. An expression is a one-liner that returns a value (mostly, but not limited to, Booleans). It is a strip-down version of Twig (only the expression part of it is implemented.) Like Twig, the expression is lexed, parsed, and compiled/evaluated. So, it is immune to external injections by design. If we compare it to Twig, here are the main big differences: * only support for Twig expressions * no ambiguity for calls (foo.bar is only valid for properties, foo['bar'] is only valid for array calls, and foo.bar() is required for method calls) * no support for naming conventions in method calls (if the method is named getFoo(), you must use getFoo() and not foo()) * no notion of a line for errors, but a cursor (we are mostly talking about one-liners here) * removed everything specific to the templating engine (like output escaping or filters) * no support for named arguments in method calls * only one extension point with functions (no possibility to define new operators, ...) * and probably even more I don't remember right now * there is no need for a runtime environment, the compiled PHP string is self-sufficient An open question is whether we keep the difference betweens arrays and hashes. The other big difference with Twig is that it can work in two modes (possible because of the restrictions described above): * compilation: the expression is compiled to PHP and is self-sufficient * evaluation: the expression is evaluated without being compiled to PHP (the node tree produced by the parser can be serialized and evaluated afterwards -- so it can be saved on disk or in a database to speed up things when needed) Let's see a simple example: ```php $language = new ExpressionLanguage(); echo $language->evaluate('1 + 1'); // will echo 2 echo $language->compile('1 + 2'); // will echo "(1 + 2)" ``` The language supports: * all basic math operators (with precedence rules): * unary: not, !, -, + * binary: or, ||, and, &&, b-or, b-xor, b-and, ==, ===, !=, !==, <, >, >=, <=, not in, in, .., +, -, ~, *, /, %, ** * all literals supported by Twig: strings, numbers, arrays (`[1, 2]`), hashes (`{a: "b"}`), Booleans, and null. * simple variables (`foo`), array accesses (`foo[1]`), property accesses (`foo.bar`), and method calls (`foo.bar(1, 2)`). * the ternary operator: `true ? true : false` (and all the shortcuts implemented in Twig). * function calls (`constant('FOO')` -- `constant` is the only built-in functions). * and of course, any combination of the above. The compilation is better for performances as the end result is just a plain PHP string without any runtime. For the evaluation, we need to tokenize, parse, and evaluate the nodes on the fly. This can be optimized by using a `ParsedExpression` or a `SerializedParsedExpression` instead: ```php $nodes = $language->parse($expr, $names); $expression = new SerializedParsedExpression($expr, serialize($nodes)); // You can now store the expression in a DB for later reuse // a SerializedParsedExpression can be evaluated like any other expressions, // but under the hood, the lexer and the parser won't be used at all, so it''s much faster. $language->evaluate($expression); ``` That's all folks! I can see many use cases for this new component, and we have two use cases in Symfony that we can implement right away. ## Using Expressions in the Service Container The first one is expression support in the service container (it would replace #8850) -- anywhere you can pass an argument in the service container, you can use an expression: ```php $c->register('foo', 'Foo')->addArgument(new Expression('bar.getvalue()')); ``` You have access to the service container via `this`: container.get("bar").getvalue(container.getParameter("value")) The implementation comes with two functions that simplifies expressions (`service()` to get a service, and `parameter` to get a parameter value). The previous example can be simplified to: service("bar").getvalue(parameter("value")) Here is how to use it in XML: ```xml <parameters> <parameter key="value">foobar</parameter> </parameters> <services> <service id="foo" class="Foo"> <argument type="expression">service('bar').getvalue(parameter('value'))</argument> </service> <service id="bar" class="Bar" /> </services> ``` and in YAML (I chose the syntax randomly ;)): ```yaml parameters: value: foobar services: bar: class: Bar foo: class: Foo arguments: [@=service("bar").getvalue(parameter("value"))] ``` When using the container builder, Symfony uses the evaluator, but with the PHP dumper, the compiler is used, and there is no overhead as the expression engine is not needed at runtime. The expression above would be compiled to: ```php $this->get("bar")->getvalue($this->getParameter("value")) ``` ## Using Expression for Security Access Control Rules The second use case in Symfony is for access rules. As we all know, the way to configure the security access control rules is confusing, which might lead to insecure applications (see http://symfony.com/blog/security-access-control-documentation-issue for more information). Here is how the new `allow_if` works: ```yaml access_control: - { path: ^/_internal/secure, allow_if: "'127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" } ``` This one restricts the URLs starting with `/_internal/secure` to people browsing from the localhost. Here, `request` is the current Request instance. In the expression, there is access to the following variables: * `request` * `token` * `user` And to the following functions: * `is_anonymous` * `is_authenticated` * `is_fully_authenticated` * `is_rememberme` * `has_role` You can also use expressions in Twig, which works well with the `is_granted` function: ```jinja {% if is_granted(expression('has_role("FOO")')) %} ... {% endif %} ``` ## Using Expressions in the Routing Out of the box, Symfony can only match an incoming request based on some pre-determined variables (like the path info, the method, the scheme, ...). But some people want to be able to match on more complex logic, based on other information of the Request object. That's why we introduced `RequestMatcherInterface` recently (but we no default implementation in Symfony itself). The first change I've made (not related to expression support) is implement this interface for the default `UrlMatcher`. It was simple enough. Then, I've added a new `condition` configuration for Route objects, which allow you to add any valid expression. An expression has access to the `request` and to the routing `context`. Here is how one would configure it in a YAML file: ```yaml hello: path: /hello/{name} condition: "context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'" ``` Why do I keep the context as all the data are also available in the request? Because you can also use the condition without using the RequestMatcherInterface, in which case, you don't have access to the request. So, the previous example is equivalent to: ```yaml hello: path: /hello/{name} condition: "request.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'" ``` When using the PHP dumper, there is no overhead as the condition is compiled. Here is how it looks like: ```php // hello if (0 === strpos($pathinfo, '/hello') && preg_match('#^/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches) && (in_array($context->getMethod(), array(0 => "GET", 1 => "HEAD")) && preg_match("/firefox/i", $request->headers->get("User-Agent")))) { return $this->mergeDefaults(array_replace($matches, array('_route' => 'hello')), array ()); } ``` Be warned that conditions are not taken into account when generating a URL. ## Using Expressions in the Validator There is a new Expression constraint that you can put on a class. The expression is then evaluated for validation: ```php use Symfony\Component\Validator\Constraints as Assert; /** * @Assert\Condition(condition="this.getFoo() == 'fo'", message="Not good!") */ class Obj { public function getFoo() { return 'foo'; } } ``` In the expression, you get access to the current object via the `this` variable. ## Dynamic annotations The expression language component is also very useful in annotations. the SensoLabs FrameworkExtraBundle leverages this possibility to implement HTTP validation caching in the `@Cache` annotation and to add a new `@Security` annotation (see sensiolabs/SensioFrameworkExtraBundle#238.) Commits ------- d4ebbfd [Validator] Renamed Condition to Expression and added possibility to set it onto properties a3b3a78 [Validator] added a constraint that runs an expression 1bcfb40 added optimized versions of expressions 984bd38 mades things more consistent for the end user d477f15 [Routing] added support for expression conditions in routes 86ac8d7 [ExpressionLanguage] improved performance e369d14 added a Twig extension to create Expression instances 38b7fde added support for expression in control access rules 2777ac7 [HttpFoundation] added ExpressionRequestMatcher c25abd9 [DependencyInjection] added support for expressions in the service container 3a41781 [ExpressionLanguage] added support for regexes 9d98fa2 [ExpressionLanguage] added the component
| * | | | | added support for expression in control access rulesFabien Potencier2013-09-191-3/+3
| | |_|_|/ | |/| | |
* | | | | merged branch nicolas-bastien/remove_unsued_statement (PR #9075)Fabien Potencier2013-09-192-9/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR was merged into the master branch. Discussion ---------- [Security] Remove unused use statement Commits ------- 6981669 Remove unused use statement
| * | | | | Remove unused use statementNicolas Bastien2013-09-192-9/+0
| | | | | |