Generating code for PHP5 is corrupted when generations comes from inheritance from class and interface (see error1.png) Workaround: delete connection with interface from child class dialog window (very importand!), connect child with interface again ;) Remeber to save(and regenerate your code too) after every step. Reproducible: Always Steps to Reproduce: 1.Make interface and parent class 2. make child class 3. connect interface and than parent class with child
Created attachment 87483 [details] error1
Created attachment 87484 [details] error2
According to http://stackoverflow.com/questions/652157/can-a-class-extend-both-a-class-and-implement-an-interface should the generated code be valid. Also running this class through a php5 (5.4.20) interpreter do not produce any error, while it reports a syntax error if I exchange the terms 'extends' and 'implements'. What I can see is that for that case (one extends and one or multiple implements) the warning is obsolate and should be removed. May this be an issue of the NetBeans IDE ?
(In reply to comment #3) > According to > http://stackoverflow.com/questions/652157/can-a-class-extend-both-a-class- > and-implement-an-interface should the generated code be valid. > Also running this class through a php5 (5.4.20) interpreter do not produce > any error, while it reports a syntax error if I exchange the terms 'extends' > and 'implements'. > What I can see is that for that case (one extends and one or multiple > implements) the warning is obsolate and should be removed. > > May this be an issue of the NetBeans IDE ? Looks not, the screenshot did not show that the generated class ArticleWsInt contains a method declaration for getArticlesByContent() and and an "implements" methods shown in the screenshot with the same name. The problem looks like that UMLClassifier::getRealizations() returns a realization from self for class ArticleWsInt, although it do not use any realizations.
Git commit 11f59ca774e9ff1131c115ae1a03a7c27df96dd6 by Ralf Habacker. Committed on 30/06/2014 at 11:51. Pushed by habacker into branch 'master'. php5 generator fix: Hide misleading warning when using single inheritance and multiple implementations which is supported by php5. M +1 -1 umbrello/codegenerators/php/php5writer.cpp M +3 -1 umbrello/umlcanvasobject.cpp M +1 -1 umbrello/umlcanvasobject.h http://commits.kde.org/umbrello/11f59ca774e9ff1131c115ae1a03a7c27df96dd6
Created attachment 87490 [details] simplified xmi test case
Git commit 9ffb8eb81d5e3f0df1c011502633ff6224518d78 by Ralf Habacker. Committed on 30/06/2014 at 12:24. Pushed by habacker into branch 'master'. PHP5 writer fix: Exclude realization to self, which creates additional wrong 'implement' methods on interface classes. It is currently unknown why there is an realization to self, which may also affect other code generators. M +4 -0 umbrello/codegenerators/php/php5writer.cpp http://commits.kde.org/umbrello/9ffb8eb81d5e3f0df1c011502633ff6224518d78
Git commit 1809908a8c2794b9fb8e01c4677ab8a2fcc1c878 by Ralf Habacker. Committed on 30/06/2014 at 11:51. Pushed by habacker into branch 'KDE/4.13'. php5 generator fix: Hide misleading warning when using single inheritance and multiple implementations which is supported by php5. FIXED-IN:4.13.3 (cherry picked from commit 11f59ca774e9ff1131c115ae1a03a7c27df96dd6) M +1 -1 umbrello/codegenerators/php/php5writer.cpp M +3 -1 umbrello/umlcanvasobject.cpp M +1 -1 umbrello/umlcanvasobject.h http://commits.kde.org/umbrello/1809908a8c2794b9fb8e01c4677ab8a2fcc1c878
Git commit 0144f78c14130db99c76ddfae48f5518b62fd4a3 by Ralf Habacker. Committed on 30/06/2014 at 12:24. Pushed by habacker into branch 'KDE/4.13'. PHP5 writer fix: Exclude realization to self, which creates additional wrong 'implement' methods on interface classes. It is currently unknown why there is a realization to self, which may also affect other code generators. FIXED-IN:4.13.3 (cherry picked from commit 9ffb8eb81d5e3f0df1c011502633ff6224518d78) M +4 -0 umbrello/codegenerators/php/php5writer.cpp http://commits.kde.org/umbrello/0144f78c14130db99c76ddfae48f5518b62fd4a3
*** Bug 191038 has been marked as a duplicate of this bug. ***