File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1111 branches :
1212 - " *.x"
1313
14- env :
15- fail-fast : true
16- COMPOSER_ROOT_VERSION : " 1.4"
17-
1814jobs :
1915 phpunit :
2016 name : " PHPUnit"
4440 steps :
4541 - name : " Checkout"
4642 uses : " actions/checkout@v2"
47- with :
48- fetch-depth : 2
4943
5044 - name : " Install PHP with XDebug"
5145 uses : " shivammathur/setup-php@v2"
Original file line number Diff line number Diff line change @@ -84,11 +84,13 @@ private function getAttributeName(callable $controller): string
8484
8585 private function isParamFetcherType (\ReflectionParameter $ controllerParam ): bool
8686 {
87- $ type = $ controllerParam ->getClass ();
88- if (null === $ type ) {
87+ $ type = $ controllerParam ->getType ();
88+ if (null === $ type || $ type -> isBuiltin () || ! $ type instanceof \ReflectionNamedType ) {
8989 return false ;
9090 }
9191
92- return $ type ->implementsInterface (ParamFetcherInterface::class);
92+ $ class = new \ReflectionClass ($ type ->getName ());
93+
94+ return $ class ->implementsInterface (ParamFetcherInterface::class);
9395 }
9496}
Original file line number Diff line number Diff line change 1- Copyright (c) 2011-2020 FriendsOfSymfony <http://friendsofsymfony.github.com/>
1+ Copyright (c) 2011-2021 FriendsOfSymfony <http://friendsofsymfony.github.com/>
22
33Permission is hereby granted, free of charge, to any person obtaining a copy
44of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ applications with Symfony. Features include:
1212 compatible with RFC 7807 using the Symfony Serializer component or the
1313 JMS Serializer
1414
15- [ ![ Build Status] ( https://travis-ci.org/ FriendsOfSymfony/FOSRestBundle.svg?branch=master )] ( https://travis-ci.org /FriendsOfSymfony/FOSRestBundle )
15+ [ ![ Build Status] ( https://img.shields.io/github/workflow/status/ FriendsOfSymfony/FOSRestBundle/CI?style=flat-square )] ( https://github.com /FriendsOfSymfony/FOSRestBundle/actions?query=workflow:CI )
1616[ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/?branch=master )
1717[ ![ Code Coverage] ( https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/?branch=master )
1818[ ![ Total Downloads] ( https://poser.pugx.org/FriendsOfSymfony/rest-bundle/downloads.svg )] ( https://packagist.org/packages/FriendsOfSymfony/rest-bundle )
You can’t perform that action at this time.
0 commit comments