The software is available from Fedora’s official repository. To install it, invoke:
sudo dnf install eclipse
This will install the base IDE and Eclipse platform, which enables you to develop Java applications. In order to add PHP development support to the IDE, run this command:
sudo dnf install eclipse-pdt
This will install PHP development tools like PHP project wizard, PHP server configurations, composer support, etc.
This IDE has many features that make PHP development easier. For example, it has a comprehensive project wizard (where you can configure many options for your new projects). It also has built-in features like composer support, debugging support, a browser,a terminal, and more.
You can click the Finish button to create the project or press Next to configure other options like adding include and build paths. You don’t need to change those in most cases.
Once the project is created, right click on the project folder and select New → PHP File to add a new PHP file to the project. For this tutorial I named it index.php, the conventionally-recognized default file in every PHP project.
Then add the your code to the new file.
Once your page is ready, you can see the result output by moving the file to your web server document root or by creating a development PHP server in the project directory.
Thanks to the built-in terminal in Eclipse, we can launch a PHP development server right from within the IDE. Simply click the terminal icon on the toolbar () and click OK. In the new terminal, change to the project directory and run the following command:
php -S localhost:8080 -t . index.php
Now, open a browser and head over to http://localhost:8080. If everything has been done correctly per instructions and your code is error-free, you will see the output of your PHP script in the browser.
Unfortunately eclipse seems to be broken:
[root@localhost ~]# dnf install eclipse –skip-broken
Last metadata expiration check: 0:50:05 ago on fr. 14. feb. 2020 kl. 10.33 +0100.
Problem: package eclipse-jdt-1:4.14-5.fc31.noarch requires eclipse-platform = 1:4.14-5.fc31, but none of the providers can be installed
– package eclipse-platform-1:4.14-5.fc31.x86_64 requires glassfish-el >= 3.0.1, but none of the providers can be installed
– cannot install the best candidate for the job
– package glassfish-el-3.0.1-0.12.b08.module_f31+6519+12cd0b27.noarch is filtered out by modular filtering
– package glassfish-el-3.0.1-0.12.b08.module_f31+6793+1c93c38e.noarch is filtered out by modular filtering
– package glassfish-el-3.0.1-0.11.b08.fc31.noarch is filtered out by modular filtering
Package Architecture Version Repository Size
Skipping packages with broken dependencies:
eclipse-jdt noarch 1:4.14-5.fc31 updates 31 M
eclipse-platform x86_64 1:4.14-5.fc31 updates 40 M
Skip 2 Packages
Nothing to do.
Download it from the eclipse website and install that way, that usually worked for me. While I do not use it any more eclipse installations have been broken/problematic since forever in Fedora as I recall. I wonder how the author just got it to work.
Also, it has proven to be a pain in any case braking with Java open SDK updates and third party dependencies. I was often fixing things manually with updates.
Today I would not recommend this IDE. I switched to vscode on Fedora a long time ago and everything “just works” once you know what you are doing. Pardon the NVidia ray-tracing quote 🙂
I have had my problems with Eclipse, mostly in terms of its complexity and very intricate configurations, but I don’t remember seeing its packages broken, at least during the last 4-5 releases I can recall.
I was able to install by doing “sudo dnf module enable eclipse:latest”
That should have been in the article. This fixed mine, I couldn’t install without enabling the module that the article fails to mention. Seeing as the module isn’t enabled by default, it should have been mentioned.
Thanks, agree it should be in article
I prefer netbeans 😉
There was a discussion in Fedora mailing lists to include NetBeans in Fedora. I hope that succeeds. I like NetBeans too.
Yes you can do that, but first add another 32GB of RAM to your PC or you can just use VScode…
… then let the language server consume the 32G of RAM with a few projects open.
No one gonna make development like that in 2020 with PHP
Why you make pointless articles about software development. But not making articles directly related with the OS.
Eclipse is used by millions of developers. Also, the Fedora Project is not just about creating an operating system. The Fedora Project’s main goal is actually to “advance free software“.
I think people just like VSCode because it has a black theme. If they actually explored the functionality differences between VSCode and Eclipse, they would not bother with VSCode because it is just a toy compared to Eclipse.