-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[3.8] Namespace document #16367
[3.8] Namespace document #16367
Conversation
This has test issues. Error displaying the error page: Application Instantiation Error: include_once(/home/travis/build/joomla/joomla-cms/libraries/joomla/document/html/renderer/component.php): failed to open stream: No such file or directory |
@mbabker I removed that files because are duplicated and are not needed any more. Look at the files, there is only mapping to deprecated files. We can solve compatibilities issues in classmap.php file. https://github.com/fastslack/joomla-cms/blob/namespace-document/libraries/classmap.php#L191 Maybe we should remove that tests |
We don't need the format in the short class section for the renderers. So for example instead of |
OK, one more pedantic change, then there's one concern we need to quickly look over. For the document classes, can you change it to The concern - we have some files here that have multiple classes in them. I think this would be a good time to move them out to separate files. |
} | ||
// Default to the raw format | ||
else | ||
{ | ||
$ntype = $type; | ||
$class = 'JDocumentRaw'; | ||
$class = 'DocumentRaw'; |
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.
Namespace is missing, or?
|
||
if (!class_exists($class)) | ||
{ | ||
// "Legacy" class name structure | ||
$class = 'JDocumentRenderer' . $type; | ||
$class = 'DocumentRenderer' . $type; |
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.
Namespace is missing, or?
* | ||
* @since 11.1 | ||
*/ | ||
class JOpenSearchUrl | ||
class OpenSearchUrl |
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.
This classe should be moved to its own file.
@@ -264,11 +268,11 @@ class JOpenSearchUrl | |||
} | |||
|
|||
/** | |||
* JOpenSearchImage is an internal class that stores Images for the OpenSearch Description |
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.
This classe should be moved to its own file.
* | ||
* @since 11.1 | ||
*/ | ||
class JOpenSearchImage |
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.
This classe should be moved to its own file.
@@ -78,7 +81,7 @@ public function getName() | |||
* | |||
* @param string $name Document name | |||
* | |||
* @return JDocumentXml instance of $this to allow chaining | |||
* @return JXmlDocument instance of $this to allow chaining |
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.
J needs to be removed.
Thanks! |
// New class name format adds the format type to the class name | ||
$class = 'JDocumentRenderer' . ucfirst($this->getType()) . ucfirst($type); | ||
// Determine the path and class | ||
$class = __NAMESPACE__ . '\\Renderer\\' . ucfirst($this->getType()) . '\\Renderer' . ucfirst($this->getType()) . ucfirst($type); |
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.
If I'm reading this line right it's not building the correct namespaced class names.
* | ||
* @since 11.1 | ||
*/ | ||
class JFeedItem | ||
class FeedItem |
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.
This and the other classes in this file should move to separate files now.
Fixed the items I pointed out and merged to staging. |
Namespace for document classes
Summary of Changes
Move /libraries/joomla/document to /libraries/src/Joomla/CMS/Document
Testing Instructions
Apply patch and try to create one article
Expected result
No errors