Bug #55876

Bug #55830: Cleanup mess with treeView implementations

Rename classes with the same name

Added by Tymoteusz Motylewski almost 6 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-02-11
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

We have 3 implementations of the \localPageTree class in the global namespace in:
- db_new.php
- move_el.php
- class.browse_links.php

We should clean this up, as it's quite confusing for the developer which class is used when and makes autoloading impossible.

I attach Sequence diagram for db_new.php (and a source code of it). Diagram was generated with http://interactive.blockdiag.com/seqdiag/
For the class inheritance diagram see http://forge.typo3.org/issues/55830

db_new_php_sequence_diagram.svg View (8.93 KB) Tymoteusz Motylewski, 2014-02-11 15:30

db_new_php_sequence_diagram.txt View (682 Bytes) Tymoteusz Motylewski, 2014-02-11 15:33

move_el_php_sequence_diagram.svg View (10.5 KB) Tymoteusz Motylewski, 2014-02-11 18:57

move_el_php_sequence_diagram.txt View (786 Bytes) Tymoteusz Motylewski, 2014-02-11 18:57


Related issues

Related to TYPO3 Core - Task #64516: Move non-namespaced class into correct places Closed 2015-01-26

Associated revisions

Revision d3f313f8 (diff)
Added by Tymoteusz Motylewski almost 6 years ago

[TASK] Rename classes with the same name

We have 3 implementations of the \localPageTree
class in the global namespace:
- db_new.php
- move_el.php
- class.browse_links.php

This patch renames classes from db_new and move_el files.
It should not break non core scripts, as both db_new.php
and move_el.php are entry points, so classes defined
there should only be used in the entry point scope.

The class 'localPageTree' from the class.browse_links.php
will keep its name, so it can be added to autoload now.

Resolves: #55876
Releases: 6.2
Change-Id: I2e084349b93af212aec85b368e7e3468a76c7a82
Reviewed-on: https://review.typo3.org/27572
Reviewed-by: Markus Klein
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#3 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

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

#4 Updated by Gerrit Code Review almost 6 years ago

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

#5 Updated by Tymoteusz Motylewski almost 6 years ago

Before the patch it worked like that:
- PagePositionMap always created getInstance("localPageTree") object for tree rendering.
- there were multiple implementations of the localPageTree object in different files.
- none of them were registered in the autoloader.
- so depending on the entry point script, different class was loaded (from db_new.php, move_el.....)
- so at the end PagePositionMap created different 'localPageTree' classes, depending on the entry point

#6 Updated by Gerrit Code Review almost 6 years ago

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

#7 Updated by Gerrit Code Review almost 6 years ago

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

#8 Updated by Tymoteusz Motylewski almost 6 years ago

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

#9 Updated by Ernesto Baschny almost 6 years ago

  • Parent task set to #55830

#10 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF