Giter VIP home page Giter VIP logo

phpdataobjectgeneratorplugin's Introduction

Php Data Object Generator plugin for IntelliJ and PhpStorm

Version Downloads

PHP Data Object Generator

Description

Code generator plugin for PHP Data Objects (Value Object, DTO/Data Transfer Object, etc...) and Builder pattern objects for creating them.

Cost

The basic code generator for Data Objects and Builders are free and require no license. Just install the plugin. Advanced in-place refactoring of previously generated classes to add/remove class properties require a nominal one time fee to use after the 30-day trial.

Features

Free

  • Generate new Data Objects by defining class properties.
  • Generate Builder classes for your Data Objects.
  • Modify templates used in generation.

Paid

  • Ability to in-place refactor the Data Object and their Builders to add and remove properties.

Usage

To generate a new Data Object:

  • Select "Php Data Object" from the New File menu.
    • Right Click > New > Php Data Object
  • Fill in the dialog supplying classname and property definitions.
  • Optionally select to make the class immutable (no "setter" methods will be generated).
  • Optionally enable generating a Builder for the class.

To generate a Builder from an existing PHP class:

  • Select "Builder..." from the Generate menu
    • Right Click in Editor view on PHP class > Generate > Builder...
  • Define Builder classname and select which properties to include in the Builder.

Modify Templates used to Generate Code

  • Open Project Preferences
    • alt-. or command-.
  • Within Preferences: Editor > File and Code Templates > "Other" tab > PHP Data Object Plugin
  • Select "PHP DataObject Plugin"
    • Edit templates as needed.

To In-Place Refactor existing Data Object:

  • Select "Update Data Object" from the Refactor menu
    • Right Click in Editor view on PHP class > Refactor > Update Data Object
  • Unselect any properties you wish to remove from the Existing Properties table.
  • Define any properties you wish to add to the New Properties table.

Note: In-place refactoring will only function on data classes previously generated using this plugin.

Note: Making significant modifications to the included templates may cause the automatic refactoring to fail or produce otherwise unsatisfactory results. If you run into issues please submit a bug report with your template and example code.

Submit BugReports or Feature Requests: https://github.com/SourceLabOrg/PhpDataObjectGeneratorPlugin/issues


Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "Php Data Object Generator" > Install Plugin

  • JetBrains Market Place:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


phpdataobjectgeneratorplugin's People

Contributors

crim avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seanpm2001

phpdataobjectgeneratorplugin's Issues

Generating is broken in 2023.2.3 due to NPE

I tried to generate a new data object or just a builder and am receiving the following error. This is a new setup for me. So, I don't have a baseline for what's causing the failure.

Potentially Relevant Details:

  • PHP Data Object Generator Version: 2021.1.15
  • IntelliJ IDEA 2023.2.3 (Ultimate Edition)
  • Build #IU-232.10072.27, built on October 10, 2023
  • Runtime version: 17.0.8.1+7-b1000.32 aarch64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • macOS 14.0
  • GC: G1 Young Generation, G1 Old Generation
  • Metal Rendering is ON
  • Registry:
  • ide.experimental.ui=true
    

Full stack trace:

java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null
	at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:232)
	at org.sourcelab.intellij.plugin.PhpDataObjectGenerator.ui.dialogs.CreateDataObjectDialog.$$$setupUI$$$(CreateDataObjectDialog.java)
	at org.sourcelab.intellij.plugin.PhpDataObjectGenerator.ui.dialogs.CreateDataObjectDialog.<init>(CreateDataObjectDialog.java:97)
	at org.sourcelab.intellij.plugin.PhpDataObjectGenerator.extensionPoints.actions.CreateNewFileAction.actionPerformed(CreateNewFileAction.java:52)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:313)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:313)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:300)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:293)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:68)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:115)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:115)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
	at java.desktop/java.awt.Component.processEvent(Component.java:6422)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4954)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4581)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4522)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2808)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:638)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:592)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Not compatible with IntelliJ IDEA 2023.3

PHP Data Object Generator 2021.1.14 (latest version) compatibility range: 212—232.*

Supported Products

PhpStorm — 2021.2 — 2023.2.4

IntelliJ IDEA Ultimate — 2021.2 — 2023.2.5

com.intellij.diagnostic.PluginException on 2021.1.16

IntelliJ IDEA 2024.1 (Ultimate Edition)
Build #IU-241.14494.240, built on March 28, 2024

Runtime version: 17.0.10+8-b1207.12 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.5.0-26-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 10240M
Cores: 4
Registry:
  ide.images.show.chessboard=true
Non-Bundled Plugins:
  com.jetbrains.plugins.ini4idea (241.14494.240)
  Batch Scripts Support (1.0.13)
  icu.windea.bbcode (1.8)
  dev.meanmail.plugin.nginx-intellij-plugin-pro (2022.1.1)
  intellij-awk (0.4.3.1)
  com.plugin.image-icon-viewer (1.0.11)
  com.github.obiscr.exceleditor (2024.3.1-222.233)
  com.shuzijun.markdown-editor (2.0.5)
  com.alayouni.ansiHighlight (24.1.0-RC)
  org.intellij.RegexpTester (2.2.0)
  ru.limydesign.plugins.yandex.translate (0.1.0)
  artsiomch.cmake (241.0.1-EAP)
  artsiomch.cmake.plus (241.0.1-EAP)
  com.mnw.tabmover (1.5.2)
  ru.ilimurzin.bitrixexcluder (1.1.0)
  com.bruce.intellijplugin.RedisPlugin (2023.10.28)
  com.github.izhangzhihao.intellijgooglesearch (0.0.2)
  com.github.exidcuter.dockerregistryexplorer (1.1.0-stable)
  com.jetbrains.CyanTheme (1.3)
  com.intellij.apacheConfig (241.14494.240)
  com.vexus2.intellij.openingithub (1.0.6)
  org.jetbrains.plugins.stylus (241.14494.140)
  com.mroche.JsonHelper (1.3.2)
  de.ehmkah.projects.imgdiff (1.11.0)
  org.jetbrains.plugins.localization (241.14494.150)
  com.oxygenxml.json.schema.generator (2024.1.0)
  com.devwook.copy_path_helper (1.1.2)
  lermitage.intellij.extra.icons (2024.3.4)
  krasa.IdeaIconPack (1.14)
  Pythonid (241.14494.240)
  com.ess.terminal-pro (1.1.9.241)
  man-page-viewer (0.1.1)
  MHCommitMessageTemplate (1.0.3)
  String Manipulation (9.12.0)
  com.jetbrains.space (241.14494.150)
  com.euphoricity.gitignore (0.3)
  GrepConsole (12.25.0-IJ2023.3)
  com.intellij.ml.llm (241.14494.240)
  com.majera.intellij.codereview.bitbucket (2024.1.6.241)
  git-extended-update-index (0.1.3)
  mobi.hsz.idea.gitignore (4.5.3)
  com.jetbrains.packagesearch.intellij-plugin (241.0.8)
  com.intellij.tide (241.14494.251)
  io.github.guoci.PythonDocumentationLinkProvider (0.1.4)
  org.tonybaloney.security.pycharm-security (1.29.0)
  ru.meanmail.plugins.prettify-python (2022.1)
  ru.meanmail.plugin.django_command_runner (2022.1)
  com.github.kawamataryo.copygithublink (0.5.3)
  com.majera.intellij.codereview.gitlab (2024.1.6.241)
  com.jetbrains.php (241.14494.240)
  com.niclas-van-eyk.laravel-make-integration (2.3.5)
  com.jetbrains.twig (241.14494.240)
  com.xu (1.3)
  com.funivan.idea.phpClean (2023.12.17)
  com.clutcher.comments_highlighter (2024.1.13)
  nl.deschepers.laraveltinker (2.6.1)
  ru.itrack.bitrix (0.2.0)
  com.kalessil.phpStorm.phpInspectionsUltimate-mp (2024.1.1)
  com.jetbrains.php.blade (241.14494.240)
  dev.ekvedaras.laravelquery (4.0.2)
  com.kalessil.phpStorm.yii2inspections (1.0.6)
  org.jetbrains.plugins.phpstorm-remote-interpreter (241.14494.158)
  org.jetbrains.plugins.phpstorm-docker (241.14494.158)
  com.jetbrains.php.framework (241.14494.240)
  com.jetbrains.php.wordPress (241.14494.240)
  ru.vkurdin.idea.php.lambdafolding (0.3.0)
  com.wbars.php.folding (1.0.3)
  com.intellij.php.codeigniter3 (0.6.0)
  com.github.woru.options-completion-phpstorm-plugin (0.0.7)
  ru.adelf.idea.dotenv (2024.1)
  com.laravel_idea.plugin (8.1.3.241)
  org.sourcelab.intellij.plugin.PHPDataObjectGenerator (2021.1.16)
  com.eny.i18n (2.6.2)
  net.king2500.plugins.PhpAdvancedAutoComplete (1.1.0)
  de.espend.idea.php.toolbox (6.2.0)
  de.espend.idea.php.annotation (10.0.0)
  fr.adrienbrault.idea.symfony2plugin (2023.1.267)
  de.espend.idea.shopware (4.4.3)
  org.endpointdeps.EndpointDependencies (1.3)
  zielu.gittoolbox (500.2.3+233)
  com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.15.0)
  Base64 for IDEA and Storm (1.1b)
Kotlin: 241.14494.240-IJ
Current Desktop: KDE

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'org.sourcelab.intellij.plugin.PhpDataObjectGenerator.extensionPoints.actions.UpdateDataObjectFromClassAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: org.sourcelab.intellij.plugin.PHPDataObjectGenerator]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
	at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
	at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
	at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.