Bug 148911 - PHP code import for Umbrello
Summary: PHP code import for Umbrello
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: 2.23 (KDE Applications 17.08)
Assignee: Umbrello Development Group
URL:
Keywords:
: 379187 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-16 22:51 UTC by Lance Andersen
Modified: 2017-07-18 04:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.22.80 (KDE Applications 17.07.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lance Andersen 2007-08-16 22:51:26 UTC
Version:           1.5.6 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

I'd like to see PHP5 class import functionality for Umbrello :)
Comment 1 Ralf Habacker 2017-05-02 06:07:35 UTC
*** Bug 379187 has been marked as a duplicate of this bug. ***
Comment 2 Ralf Habacker 2017-05-02 06:12:51 UTC
I see currently two options for implementing php code import:

1. Extend a present umbrello import parser to support php5 code parsing 
2. Use a 3rdparty php parser
Comment 3 Ralf Habacker 2017-05-02 08:50:18 UTC
related to possible solution:

1. From inspecting the source using the present c++ parser looks be the best choice
Advantages:
- no external dependencies required
disadvantages:
- depends on current not up to date c++ parser, 
- needs to be maintained local

2. there is the kde kdev-php repo which provides a php parser. It depends on kdevplatform and kdevelop-pg-qt

advantages: 
- maintained parser

disavantage:
- adds external dependencies (could be elimated by placing and updating a snapshot into umbrello source)
Comment 4 Ralf Habacker 2017-07-10 23:27:29 UTC
Git commit 14eee6834cbc611fd0a82238a08d7be149aca823 by Ralf Habacker.
Committed on 28/06/2017 at 17:32.
Pushed by habacker into branch 'master'.

Enable building php import support if all required dependencies have been found

Building PHP import support requires development packages for
KDevPlatform and kdevelop-PG-Qt and is currently limited to KDE4.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
FIXED-IN:2.22.80 (KDE Applications 17.07.80)

M  +5    -1    CMakeLists.txt
M  +12   -4    umbrello/CMakeLists.txt
M  +4    -0    umbrello/codeimport/classimport.cpp

https://commits.kde.org/umbrello/14eee6834cbc611fd0a82238a08d7be149aca823
Comment 5 Luigi Toscano 2017-07-11 08:11:08 UTC
When enabling this in the Qt5 version (which hopefully will be the only one soon), let people link against the version provided by KDevelop; duplicate code is not the best solution.
Comment 6 Ralf Habacker 2017-07-11 08:15:03 UTC
(In reply to Luigi Toscano from comment #5)
> When enabling this in the Qt5 version (which hopefully will be the only one
> soon), let people link against the version provided by KDevelop; duplicate
> code is not the best solution.
To what duplicated package you are refering ? In comment 4 I stated "requires development packages for KDevPlatform and kdevelop-PG-Qt"
Comment 7 Luigi Toscano 2017-07-11 09:01:27 UTC
This is a code drop of kdev-php:
https://cgit.kde.org/umbrello.git/tree/lib/kdev4-php
Comment 8 Ralf Habacker 2017-07-11 09:46:52 UTC
(In reply to Luigi Toscano from comment #7)
> This is a code drop of kdev-php:
> https://cgit.kde.org/umbrello.git/tree/lib/kdev4-php

For the record: there is also https://cgit.kde.org/umbrello.git/tree/lib/cppparser which is there because kdevelop people do not want to make their api public, so a local copy was required. You think this would now possible with KF5 ? 

The current packages of kdev-php on opensuse provides only the shared library (see https://build.opensuse.org/project/show/KDE:Extra) and not the additional tools and development headers required to build a custom parser (see fixes at https://cgit.kde.org/umbrello.git/log/lib/kdev4-php). I'm not sure if this use case will be supported by the kdev-php repo maintainer and if patches would be accepted.
Comment 9 Ralf Habacker 2017-07-11 09:59:29 UTC
Another "for the record": https://build.opensuse.org/project/show/KDE:Extra shows packages for kdevelop4-pg-qt and kdevelop5-pg-qt. Looking at the install pathes: The latter uses /usr/share/doc/packages/kdevelop5-pg-qt for storing docs to be different from the kde4 package, but on cmake level it is still named 'KDevelop-PG-Qt' and provides 'kdevelop-pg-qt' as include dir which conflicts with the related KDE4 package.

Same belongs to the kdevplatform package. The KDE4 package is named kdevplatform4 and the KF5 related kdevplatform but still uses the same cmake and include file locations as the related KDE4 package.
Comment 10 Ralf Habacker 2017-07-18 04:32:29 UTC
Git commit f0fde0c7b9a0718e331c92b4c4ce07297bfaad8b by Ralf Habacker.
Committed on 18/07/2017 at 04:26.
Pushed by habacker into branch 'arcpatch-D6761'.

Add missing implementation of PHPImport::initPerFile()

M  +7    -0    umbrello/codeimport/phpimport.cpp

https://commits.kde.org/umbrello/f0fde0c7b9a0718e331c92b4c4ce07297bfaad8b
Comment 11 Ralf Habacker 2017-07-18 04:39:12 UTC
Git commit d399d2adc56a6c668eed4a04cbb63b98d93be30f by Ralf Habacker.
Committed on 18/07/2017 at 04:33.
Pushed by habacker into branch 'Applications/17.08'.

Add missing implementation of PHPImport::initPerFile()

M  +7    -0    umbrello/codeimport/phpimport.cpp

https://commits.kde.org/umbrello/d399d2adc56a6c668eed4a04cbb63b98d93be30f