-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[HttpFoundation] deprecated finding deep items in Request
and ParameterBag
#14203
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
Changes from 1 commit
Commits
Show all changes
503 commits
Select commit
Hold shift + click to select a range
c6e5830
bumped minimal version in appveyor to 5.3.9
fabpot d4441e9
feature #15551 [Translation] added <tool> element metadata to XliffFi…
fabpot 922a534
Merge branch '2.7' into 2.8
nicolas-grekas 8fbab1e
feature #15635 [Config] Prototypes info (ogizanagi)
fabpot d76cc03
Merge branch '2.7' into 2.8
nicolas-grekas 353c94d
[translation][framework-bundle] Deprecated DiffOperation
zerustech 22b17b2
Merge branch '2.7' into 2.8
nicolas-grekas be47165
feature #15562 [translation] Deprecated DiffOperation (zerustech)
aitboudad 2592fe9
[Translator] Added missing changelog notes.
aitboudad daaf7e8
minor #15698 [2.8][Translator] Added missing changelog notes. (aitbou…
Tobion 3a15921
allow more versions of the ACL package
xabbuh c2b94a1
[2.8] Cleanup
nicolas-grekas d5c046d
minor #15694 [2.8] Deprecate IntrospectableContainerInterface (nicola…
fabpot ce5bb62
minor #15701 [SecurityBundle] allow more versions of the ACL package …
fabpot e70bec9
Merge branch '2.7' into 2.8
nicolas-grekas 0edcc2e
Fix deps
nicolas-grekas 17e00b9
[WebProfilerBundle] deprecated import/export commands
fabpot 4d1d277
added ExceptionHandler::getHtml() to expose the full HTML of an excep…
fabpot ebd009b
feature #15710 added ExceptionHandler::getHtml() to expose the full H…
fabpot 037196c
[Security\Http] Fix dep
nicolas-grekas ff5d6a3
[Translation][Loader] added XLIFF 2.0 support.
xphere ce540ae
update changelog.
aitboudad cf04e48
minor #15715 [Security\Http] Fix dep (nicolas-grekas)
nicolas-grekas ace6042
apply some fixes.
aitboudad 7af4fc7
[XLIFF 2.0] added support for target attributes.
aitboudad 4253824
removed some Form deprecation notices
fabpot a8c3b23
minor #15711 removed some Form related deprecation notices (fabpot)
fabpot e1818bd
move feature description to changelog file
xabbuh 01ad767
compatibility with older Form component versions
xabbuh cecc2ee
minor #15722 [Config] move feature description to changelog file (xab…
fabpot 84ba05b
[HttpKernel] Move required RequestStack args as first arguments
nicolas-grekas 0c24d55
[Translation][Dumper] added XLIFF 2.0 support.
aitboudad e42adf7
Remove wrong deprecation triggers for forms in the DI extension
stof 685a1cf
minor #15740 Remove wrong deprecation triggers for forms in the DI ex…
Tobion 3bae5f7
Merge branch '2.7' into 2.8
Tobion 14c538e
2.8 changes from #15733
Tobion 8497ad7
[WebProfilerBundle ] Removes the ajax animation in | sf-toolbar-block…
oyepez003 943fec9
[HtppKernel] deprecated Profiler::import/export
fabpot 224b19b
bug #15744 [WebProfilerBundle ] Removes ajax animation in sf-toolbar-…
fabpot 0383559
feature #15709 [WebProfilerBundle] deprecated import/export commands …
fabpot f1c01ed
feature #15521 [Debug] Add BufferingLogger for errors that happen bef…
fabpot d1c51a3
feature #15724 [HttpKernel] Move required RequestStack args as first …
fabpot 4b68eb1
Merge branch '2.7' into 2.8
nicolas-grekas 51b6d74
[HttpKernel] Fix RequestStack argument position and deprecated behavior
nicolas-grekas 8bc6df3
minor #15754 [HttpKernel] Fix RequestStack argument position and depr…
nicolas-grekas f8fa136
Hot fix
nicolas-grekas bfdc354
[Translation] added option flags to JsonFileDumper.
gepo f29dd93
feature #15756 [Translation] added option json_options to JsonFileDum…
aitboudad cf18a99
[Validator] mark test as legacy
TomasVotruba a9555fb
minor #15767 [Validator] mark test as legacy (TomasVotruba)
fabpot 749fba5
Convert Output::write's type to an options arg where verbosity can be…
Seldaek e9ee8f5
Make the exception output visible even in quiet mode, fixes #15680
Seldaek 209f1fc
feature #15772 Convert Output::write's type to an options arg where v…
fabpot fbba5d9
feature #15773 Make the exception output visible even in quiet mode, …
fabpot 05773c2
Redesigned the Symfony Profiler
javiereguiluz a2eebe8
feature #15523 Redesigned the Symfony Profiler (javiereguiluz)
fabpot d547ec0
[WIP] #15502 Make template shortcuts be usable without Templating com…
Koc 46eaafc
feature #15620 [WIP] #15502 Make template shortcuts be usable without…
fabpot 7b776e7
removed non-working tests
fabpot f20e4e5
fixed CS
fabpot 192523a
[DX] Added a logout link in the security panel of the web debug toolbar
javiereguiluz 74e4086
feature #14378 [DX] Added a logout link in the security panel of the …
fabpot 9bae1ae
[HttpKernel] Add entry point to more easily create/configure the DI e…
GeLoLabs 95ccd3b
feature #13616 [HttpKernel] Add entry point to more easily create/con…
fabpot 7d343e6
fixed bad merge
fabpot f64b72d
[VarDumper] Add caster for OuterIterator objects
nicolas-grekas 9e32be3
feature #15787 [VarDumper] Add caster for OuterIterator objects (nico…
fabpot 6393ec3
Merge branch '2.7' into 2.8
fabpot 8826d39
Validate the extended type for lazy-loaded type extensions
stof af4a624
feature #15743 Validate the extended type for lazy-loaded type extens…
fabpot e66bf64
Remove duplication of the handling of regex filters in the Finder
stof 62dc014
Remove minimum width for web profiler content view
jbafford 0a5807b
minor #15809 Remove minimum width for web profiler content view (jbaf…
Tobion 534c5db
bug #15811 use of twig deprecated sameas test
ctrl-f5 f3b6ffc
minor #15812 [WebProfilerBundle] bug #15811 use of twig deprecated sa…
fabpot ac7591f
[WebProfilerBundle] added btn-link.
aitboudad 7b358a1
feature #15717 [Translator][Loader] added XLIFF 2.0 support. (xphere,…
aitboudad 366879b
[Translator][FileDumper] deprecated format method in favor of formatC…
aitboudad 184d4f2
[WebProfilerBundle] Added collapsed sidebar on small screens
hason 327c647
feature #15699 [Translator][FileDumper] deprecated format method in f…
aitboudad b5599a5
[Form] Fix php warning on invalid FormFactory::createBuilder() argument
xelaris 4d275b4
Merge branch '2.7' into 2.8
nicolas-grekas c08cf4b
[Finder] Deprecate adapters and related classes
nicolas-grekas 630f3b3
[Translation] Clean whitespaces and EOL in xliff-core-2.0.xsd
nicolas-grekas 5fd9f2f
[Translation][File dumper] allow new child classes to implement only …
aitboudad 2e5e601
minor #15833 [Translation] Clean whitespaces and EOL in xliff-core-2.…
fabpot bcb2ff6
minor #15832 [Translation][File dumper] allow new child classes to im…
Tobion f5d6034
Merge branch '2.7' into 2.8
nicolas-grekas b1e0bd7
Merge branch '2.7' into 2.8
nicolas-grekas aa50596
[VarDumper] Add EnumStub for dumping virtual collections with casters
nicolas-grekas 330aa7f
Improving phpdoc on AuthenticationEntryPointInterface so people that …
weaverryan 05af97c
Initial commit (but after some polished work) of the new Guard authen…
weaverryan a0bceb4
adding Guard tests
weaverryan 873ed28
Renaming the tokens to be clear they are "post" and "pre" auth - also…
weaverryan 180e2c7
Properly handles "post auth" tokens that have become not authenticated
weaverryan 6c180c7
Adding an edge case - this should not happen anyways
weaverryan c73c32e
Thanks fabbot!
weaverryan eb158cb
Updating interface method per suggestion - makes sense to me, Request…
weaverryan d693721
Adding periods at the end of exceptions, and changing one class name …
weaverryan 6edb9e1
Tweaking docblock on interface thanks to @iltar
weaverryan ffdbc66
Splitting the getting of the user and checking credentials into two s…
weaverryan 7de05be
A few more changes thanks to @iltar
weaverryan 7a94994
Thanks again fabbot!
weaverryan 81432f9
Adding missing factory registration
weaverryan 293c8a1
meaningless author and license changes
weaverryan 0501761
Allowing for other authenticators to be checked
weaverryan 31f9cae
Adding a base class to assist with form login authentication
weaverryan c9d9430
Adding logging on this step and switching the order - not for any hu…
weaverryan 396a162
Tweaks thanks to Wouter
weaverryan 302235e
Fixing a bug where having an authentication failure would log you out.
weaverryan dd485f4
Adding a new exception and throwing it when the User changes
weaverryan e353833
fabbot
weaverryan 9b877cf
[Translation][File dumper] allow get file content without writing in …
aitboudad 805acc9
fixed typo.
aitboudad fbf7351
feature #15837 [VarDumper] Add EnumStub for dumping virtual collectio…
fabpot 926d9b7
minor #15807 Remove duplication of the handling of regex filters in t…
fabpot ea43304
feature #15805 [Finder] Deprecate adapters and related classes (nicol…
fabpot 07d08c4
Added the right revision date for status code registry
dupuchba 830a7ac
minor #15796 Added the right revision date for status code registry (…
fabpot 2e718c1
feature #15786 [Translation][File dumper] allow get file content with…
fabpot 74c24a5
minor #15814 [WebProfilerBundle] fixed cursor as pointer when hoverin…
fabpot b75755c
Merge branch '2.7' into 2.8
nicolas-grekas 70fcc9c
minor #15798 [2.8][Form] Fix php warning on invalid FormFactory::crea…
Tobion d763134
Removing unnecessary override
weaverryan a811912
Avoid errors when generating the logout URL when there is no firewall…
javiereguiluz d1ae400
bug #15861 Avoid errors when generating the logout URL when there is …
fabpot a01ed35
Adding the necessary files so that Guard can be its own installable c…
weaverryan 948ccec
Updating AbstractVoter so that the method receives the TokenInterface
weaverryan 5b8b429
feature #15870 Updating AbstractVoter so that the method receives the…
fabpot 5f2acfd
feature #14673 New Guard Authentication System (e.g. putting the joy …
fabpot 4b6fab0
[DI] Add a deprecated status to definitions
Taluu 8f6c21c
[DI] Supports the deprecated tag in loaders
Taluu 2f37cb1
[DI] Dump the deprecated status
Taluu 954247d
[DI] Trigger a deprecated error on the container builder
Taluu 0b3d0a0
[DI] Allow to change the deprecation message in Definition
Taluu 83f4e9c
[DI] Support deprecated definitions in decorators
Taluu 995cf4e
Merge branch '2.7' into 2.8
nicolas-grekas 20d3722
Implement service-based Resource (cache) validation
mpdude d60428c
feature #15738 Implement service-based Resource (cache) validation (m…
fabpot dd17dc0
[Console] Add domain exceptions to replace generic exceptions
GromNaN dacbfe9
feature #14894 [Console] Add domain exceptions to replace generic exc…
fabpot 2c4da3c
Merged LegacySecurityContext tests
wouterj 87c0c7d
Deprecate ResourceInterface::getResource()
mpdude 2377994
Merge branch '2.7' into 2.8
nicolas-grekas 6200eb5
feature #15491 Add support for deprecated definitions (Taluu)
fabpot 6588708
[Security] Deprecated supportsAttribute and supportsClass methods
wouterj 6f7aae9
feature #15151 [Security] Deprecated supportsAttribute and supportsCl…
fabpot 693af63
bug #15721 [FrameworkBundle] compatibility with older Form component …
fabpot 7653d95
[TwigBridge] Foundation form layout integration
564f06b
feature #12587 [TwigBridge] Foundation form layout integration (totophe)
fabpot d6471b3
[Validator] added BIC (SWIFT-BIC) validation constraint
mvhirsch 06b4938
feature #15519 [Validator] added BIC (SWIFT-BIC) validation constrain…
fabpot 825490a
Merge branch '2.7' into 2.8
fabpot 1c17928
deprecated the Shell Console class
fabpot 7079aa9
feature #15892 deprecated the Shell Console class (fabpot)
fabpot 8209754
minor #15893 Merged LegacySecurityContext tests (WouterJ)
fabpot f1eb185
[PropertyInfo] Import the component
dunglas 59ee12c
feature #15858 [PropertyInfo] Import the component (dunglas)
fabpot 44091f5
feature #15818 [WebProfilerBundle] Add collapsed sidebar on small scr…
fabpot 4fcf136
feature #15719 Deprecate ResourceInterface::getResource() (mpdude)
fabpot b475607
[BrowserKit] Added isFollowingRedirects and getMaxRedirects methods
Naktibalda 4a98f28
feature #15697 [BrowserKit] Added isFollowingRedirects and getMaxRedi…
fabpot f26425b
[Validator] Add Hungarian translation for the BIC constraint
1ed 5ef8abc
Add the replace rules for the security-guard component
stof 0d72411
Allow serializer 3.0 in the PropertyInfo component
stof 1701708
Fix license headers
1ed 1d5557f
minor #15918 [2.8] Fix license headers (1ed)
stof da4758a
Minor tweaks - lowering the required security-http requirement and nu…
weaverryan 869d5a7
tweaking message related to configuration edge case that we want to b…
weaverryan 8b615bb
Fix legacy security tests
stof 69e80be
Fix trigger_error calls
wouterj f403444
Updating behavior to not continue after an authenticator has set the …
weaverryan 7f04fbb
Making GuardTokenInterface extend TokenInterface
weaverryan 5fa2684
Making all "debug" messages use the debug router
weaverryan 4cc8b76
minor #15922 [Security] Fix trigger_error calls in voters (WouterJ)
Tobion a31dfa6
minor #15923 Fix legacy security tests (stof)
stof e610b41
Merge branch '2.7' into 2.8
stof c03f5c2
Massively simplifying the BC and deprecated-throwing code thanks to s…
weaverryan 1f3af26
[Form][Type Date/Time] added choice_translation_domain option.
aitboudad 3909460
feature #15301 [Form][Type Date/Time] added choice_translation_domain…
Tobion f9ddddb
[WebProfilerBundle] Fix search button click listener
xelaris 15326ad
minor #15910 Add the replace rules for the security-guard component (…
fabpot 936e1b3
minor #15912 Allow serializer 3.0 in the PropertyInfo component (stof)
fabpot 9cf4ab7
minor #15920 Guard minor tweaks (weaverryan)
fabpot 9ec98c2
minor #15901 [Validator] Add Hungarian translation for the BIC constr…
fabpot 709cc13
bug #15927 Making GuardTokenInterface extend TokenInterface (weaverryan)
fabpot 1e65f71
bug #15921 Abstract voter tweaks (weaverryan)
fabpot 5dcdc48
bug #15928 [2.8][WebProfilerBundle] Fix search button click listener …
fabpot 06c14a2
bug #15925 Updating behavior to not continue after an authenticator h…
fabpot 58ed076
Merge branch '2.7' into 2.8
fabpot 997c650
Deprecate methods inherited from SplObjectStorage
stof 6ae7d95
feature #15907 [DomCrawler] Deprecate methods inherited from SplObjec…
fabpot 8c47eb9
Removed the "Delete profiles" action from the web profiler sidebar
javiereguiluz 3011fa0
don't rely on internal sort implementation in test
xabbuh 4b94274
minor #15940 [Console] don't rely on internal sort implementation om …
fabpot d7c1463
Adding a class to make it easier to set custom authentication error m…
weaverryan 3a665af
Merge branch '2.7' into 2.8
fabpot 4021353
Merge branch '2.7' into 2.8
fabpot 156368f
feature #15882 Easier Custom Authentication errors (weaverryan)
fabpot 6be68fd
[TwigBridge] is_granted no longer raise an exception if the token sto…
lyrixx 7a88c37
[Validator] Sync polish translation file
stloyd 46746f8
minor #15960 [Validator] Sync polish translation file (stloyd)
fabpot 20c90f5
Fix tests in 2.8
wouterj dc937f8
minor #15961 [Security] Fix tests in 2.8 (WouterJ)
fabpot f51fe4a
[FrameworkBundle] [DependencyInjection] added logging of unused tags …
d3271e1
missing tags in whitelist
fabpot 4fa3eaf
[Finder] simplified code
fabpot 1c964b9
Introducing the LDAP component
csarrazi 60b9f2e
Implemented LDAP authentication and LDAP user provider
lyrixx 779d6dc
feature #15962 [Finder] simplified code (fabpot)
fabpot 32002d7
feature #15939 Removed the "Delete profiles" action from the web prof…
fabpot 7d7e07f
feature #14602 [2.8] [Ldap] Added support for LDAP (New Component + i…
fabpot 3bea01b
feature #15953 [TwigBridge] is_granted no longer raise an exception i…
fabpot dc6ee81
Profiler View Latest should preserve all the current query parameters
jbafford 078f953
feature #15356 [WebProfilerBundle] Profiler View Latest should preser…
fabpot 13d0da2
Applied the new styles to the router: commands
javiereguiluz c2cfbcf
feature #14132 Applied the new styles to the router: commands (javier…
fabpot 7f13f95
[WebProfilerBundle] fixed a template reference
fabpot f4563c3
Add a non-static API for the CssSelector component
stof 9e51279
[CssSelector] Tag all internal classes as internal ones
stof ff3c107
[TwigBundle] removed usage of Templating classes
fabpot 634aafc
feature #15970 [TwigBundle] removed usage of Templating classes (fabpot)
fabpot b9100d3
[WebProfileBundle] fix missing request var in the 'last 10' panel
fabpot 3c19ae0
bug #15973 [WebProfileBundle] fix missing request var in the 'last 10…
Tobion 9fe3b76
fix tests for the `AbstractVoter` class
xabbuh 08b2959
Updated the style for the "cache:clear" command
javiereguiluz 44c5416
Updated the styles for the "cache:warmup" command
javiereguiluz 95c9f50
added some tests
fabpot 8b8e7bb
feature #15963 added logging of unused tags (Marmelatze, fabpot)
fabpot ae283e8
[WebProfilerBundle] reflect latest changes in test
xabbuh 0d71b1e
minor #15981 [WebProfilerBundle] reflect latest changes in test (xabbuh)
fabpot 3ebe466
minor #15974 [Security] fix tests for the `AbstractVoter` class (xabbuh)
fabpot 8b7b251
[FrameworkBundle] Refactor assets:install command and apply SymfonyStyle
1ed 8e1af88
feature #14235 [FrameworkBundle] Refactored assets:install command an…
fabpot 47d001e
feature #15934 Add a non-static API for the CssSelector component (stof)
fabpot 2993b00
[Form] Guess currency field based on validator constraint
enumag 181d470
feature #15919 [Form] Guess currency field based on validator constra…
fabpot 2b90fcf
[Ldap] add some missing license file headers
xabbuh 64e7b6f
Symfony Console Style tweaks
javiereguiluz 5322cbb
feature #15964 Symfony Console Style tweaks (javiereguiluz)
fabpot 1aa884c
add replace rule for new Ldap component
xabbuh 4e2cc0f
[Console] Updated the styles of the server commands
javiereguiluz d65f864
feature #15972 [Console] Updated the styles of the server commands (j…
fabpot 7bc3ec0
feature #15978 Updated the styles of the cache commands (javiereguiluz)
fabpot f23f599
fixed typos
fabpot e256593
minor #15984 [Ldap] add some missing license file headers (xabbuh)
fabpot a76eae8
minor #15985 add replace rule for new Ldap component (xabbuh)
fabpot a2a4967
Merge branch '2.7' into 2.8
Tobion 00dffe7
remove api tags that are new in 2.8
Tobion 03ff6cb
deprecate finding deep items in request parameters
xabbuh 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
Prev
Previous commit
deprecate finding deep items in request parameters
- Loading branch information
commit 03ff6cbdc7c3aefb3246417506daa2997317924b
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
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,83 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Security\Http; | ||
|
||
use Symfony\Component\HttpFoundation\ParameterBag; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\PropertyAccess\PropertyAccess; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class ParameterBagUtils | ||
{ | ||
private static $propertyAccessor; | ||
|
||
/** | ||
* Returns a "parameter" value. | ||
* | ||
* Paths like foo[bar] will be evaluated to find deeper items in nested data structures. | ||
* | ||
* @param ParameterBag $parameters The parameter bag | ||
* @param string $path The key | ||
* @param mixed $default The default value if the parameter key does not exist | ||
* | ||
* @return mixed | ||
*/ | ||
public static function getParameterBagValue(ParameterBag $parameters, $path, $default = null) | ||
{ | ||
if (false === $pos = strpos($path, '[')) { | ||
return $parameters->get($path, $default); | ||
} | ||
|
||
$root = substr($path, 0, $pos); | ||
|
||
if (null === $value = $parameters->get($root)) { | ||
return $default; | ||
} | ||
|
||
if (null === self::$propertyAccessor) { | ||
self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); | ||
} | ||
|
||
return self::$propertyAccessor->getValue($value, substr($path, $pos)); | ||
} | ||
|
||
/** | ||
* Returns a request "parameter" value. | ||
* | ||
* Paths like foo[bar] will be evaluated to find deeper items in nested data structures. | ||
* | ||
* @param Request $request The request | ||
* @param string $path The key | ||
* | ||
* @return mixed | ||
*/ | ||
public static function getRequestParameterValue(Request $request, $path) | ||
{ | ||
if (false === $pos = strpos($path, '[')) { | ||
return $request->get($path); | ||
} | ||
|
||
$root = substr($path, 0, $pos); | ||
|
||
if (null === $value = $request->get($root)) { | ||
return; | ||
} | ||
|
||
if (null === self::$propertyAccessor) { | ||
self::$propertyAccessor = PropertyAccess::createPropertyAccessor(); | ||
} | ||
|
||
return self::$propertyAccessor->getValue($value, substr($path, $pos)); | ||
} | ||
} |
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
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.
Isn't
false !== $deep
more suitable for this check? Or even better, something likefalse !== $deep || func_num_args() > 2
to check if$deep
argument is passed regardless its value and avoiding the impact of calling a function when the value isn't the default one.