Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Fix handling of FQCNs in method parameters #61

Merged
merged 2 commits into from
Jun 27, 2016
Merged

Fix handling of FQCNs in method parameters #61

merged 2 commits into from
Jun 27, 2016

Conversation

djmattyg007
Copy link
Contributor

Previously, MethodScanner did not detect a leading T_NS_SEPARATOR
character for a type name. By failing to detect it, it passes it to
ParameterScanner without it, who then dutifully resolves the classname
as if it was relative to the current namespace.

This is obviously incorrect behaviour, and it is fixed with this patch.
Tests have also been added and updated.

Previously, MethodScanner did not detect a leading T_NS_SEPARATOR
character for a type name. By failing to detect it, it passes it to
ParameterScanner without it, who then dutifully resolves the classname
as if it was relative to the current namespace.

This is obviously incorrect behaviour, and it is fixed with this patch.
Tests have also been added and updated.
@weierophinney weierophinney merged commit 658b63f into zendframework:master Jun 27, 2016
weierophinney added a commit that referenced this pull request Jun 27, 2016
…_fqcns

Fix handling of FQCNs in method parameters
weierophinney added a commit that referenced this pull request Jun 27, 2016
weierophinney added a commit that referenced this pull request Jun 27, 2016
weierophinney added a commit that referenced this pull request Jun 27, 2016
@weierophinney
Copy link
Member

Thanks, @djmattyg007 !

@weierophinney weierophinney added this to the 3.0.3 milestone Jun 27, 2016
@weierophinney weierophinney self-assigned this Jun 27, 2016
basz added a commit to basz/zend-code that referenced this pull request Sep 28, 2016
* 'master' of https://github.com/zendframework/zend-code: (39 commits)
  Fix Travis code convention
  Fix Travis code convention
  Fix Travis code convention
  Fix Travis code convention
  1. Fix ClassScanner::getInterfaces() which don't work with Interface. 2. add TestCase  ClassScannerTest::testGetInterfacesFromInterface().
  Remove fast_finish flag
  Bumped to next dev version (3.0.5)
  Added CHANGELOG for zendframework#75
  Separated new tests to separate methods
  testCorrectExtendNamesFromGlobalNamespace
  add tests
  Added CHANGELOG for zendframework#59
  Update ClassGenerator.php
  fast fix
  Bumped to next dev version (3.0.4)
  Set date for 3.0.3
  Added CHANGELOG for zendframework#72
  Added CHANGELOG for zendframework#69
  Added CHANGELOG for zendframework#61
  Provide a fix for issue zendframework#70
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants