Bug #52944

Generating correct proxy classes for classes without a namespace

Added by Hendrik Frahmann almost 8 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-10-18
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

When packages (that are loaded with composer to Libraries) containing classes without a namespace, Flow generates a corrupt proxy class.

class FooClass_Original {
}

namespace ; // empty namespace causing error
// Parse error: syntax error, unexpected ';', expecting T_STRING or T_NS_SEPARATOR or '{' in [filename]

class FooClass {
  // proxy class
}


Related issues

Related to TYPO3.Flow - Bug #52945: Excluded classes should only be excluded from reflection but still autoloadedNew2013-10-18

Actions
#2

Updated by Alexander Berl almost 8 years ago

Should be trivial to fix with an if condition. See Object/Proxy/ProxyClass::render() line 195 ff.:
$classCode = "namespace $namespace;\n" .

#3

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24904

#4

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24904

#5

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/24904

#6

Updated by Alexander Berl over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 2.0 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26799

#8

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch 2.1 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26871

#9

Updated by Alexander Berl about 7 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF