There are so many options when it comes to PHP development environments and you have to piece it all together yourself.
I'm wondering if someone has come up with what they think is the ideal setup that gets out of your way and lets you develop.
Right now I use vim and svn from the command-line. I write scripts to manage builds but I'm thinking about looking into Phing.
I love vim but I'm seriously thinking of trying Eclipse with the PHP plugin because I imagine it makes common SVN options a bit easier (moving files around in a project).
Something to support continuous integration on the database would be a major plus!
UPDATE: Just wanted to stress that previous line up there. I realize some frameworks will help with this, but I don't use a framework. Is there some simple module out there (included in the IDE or not) that will let me easily tie my database schemas/data to a subversion revision, letting me rollback and forward, tag, branch, etc?
Any comments on things beyond the editor? For example: Builds, managing staging/production/development environments, automated testing and building upon SVN commit, etc. Ideally we can make this post a "Go to Whoah" for setting up a professional PHP team development environment.
I recommend to use a complete featured IDE like the PDT (the eclipse PHP project), it gives you:
debugging (using Xdebug or ZendDebugger)
SVN/CVS very convinient integration
DB integration (the DTP plugin)
and much more, based on features of the PDT and eclipse plugins
if you have some money to spent, I think the Zend Studio For eclipse worth it.
It gives you better debugging, PHPUnit integration, ZendFramewrok support, Refactoring and remote system support (ftp, ssh etc.)
I'm giving Netbeans 6.5 PHP bundle a try and liking it very much. I find debugging in it is less clunky than in Eclipse PDT.
I too love vim and used to develop using the same environment as you. These days though I find Eclipse PDT, with Subclipse for SVN integration, to be invaluable. XDebug is great too - no more var_dump();exit; for debugging.
One of the best plugins for a vim fan moving to Eclipse: viPlugin. Well worth the token licence fee to have vi key bindings in Eclipse.
If you are working from the command line, using Git's SVN module eases most of the SVN pain - it handles deletes and moves automagically.
The GUI front ends (kgit or qgit) provide a very intuitive history browser.
I personally like the way that AptanaStudio has pre-packaged all the great Eclipse modules you need to have a very smooth PHP development environment
Related
I'm working on refactoring a huge PHP monolith (>1.2 million LOC, running >40 Websites in >30 countries) into some more manageable composer packages to seperate concerns. Each of these packages will be living in it's own github repository, as some of them will be shared across all or just some sites, and some of them will only be relevant to one specific site.
Everything works just fine, except for the IDE integration in PHP Storm that sucks quite a bit (PHP storm sees everything as dependency, and excludes it from auto-completion by default. it takes quite a lot of configuration effort to make features like auto completion and version control integration just work)
Is there anybody having experience woking on such a multi-package project in PHPStorm who has some a somewhat convenient way to handle this?
(Changing the structure as described is not an option. It definitely is the solution that makes most sense for us)
Cheers,
Matthias
I am building a Flash, jQuery, and PHP based project which I would like to subversion from the get go. I have experience using Dreamweaver CS5's sub versioning capabilities. So, as far as the PHP and jQuery (the non-flash portion) goes, I'm pretty comfortable.
However, I would like some recommendations on how to subversion the Flash portion. I know Flash Builder has SVN capabilities, however, the flash portion isn't going to function as and RIA, but more, if you will, like a game. As far as my experience with Flash goes, this type of project will work best if done in Flash Professional. Here are the options, as I see them:
find an extension for Flash Professional which will enable SVN. Is there one???
create a "Flash Professional Project" in Flash Builder, built it in Flash Professional, and subversion with Flash Builder.
place my project within a defined site in Dreamweaver, and subversion from Dreamweaver.
I would like to avoid something like Tortoise SVN, as I have had more difficulty with that than I am up for for now. :)
Does anyone have any suggestions, or pointers as to how I can handle this?
Thank you for your time.
Well, any SVN client can handle any kind of file - you don't have to have an extension built into each piece of software you're using. The best way to do this is to put all of your project files into a folder somewhere and then using whatever SVN client you want just add that whole folder to your repo. Does that make sense? The front-end that you're using is more or less irrelevant.
I don't really understand what you are saying about TortoiseSVN, but since you are using different IDE's I would recommend you to use TortoiseSVN as the uniform interface to SVN. And IMO, TortoiseSVN is simple and powerful.
Man up and use the command line ;). Why SVN? Yes, I personally prefer it but there are other great alternatives, have a think about GIT, Mercurial and others too. Mercurial/Git have massive benefits for single developer projects. The flash file will be versioned just like everything else in there. Remember to set your ignore files appropriately to cut out all the os specific poop.
Soon as you get yourself a good versioning repository set up, it doesn't really matter what client you use. I like the one bundled with netbeans / versions or the cli.
I work on eclipse IDE mainly for php and java. I own a PC and a laptop both of which I need to use for coding. Now how do i sync code ad resources between two instances of eclipse between these two I think SVN and git are overkill for this. I own a portable USB drive. Is there some nice way to sync these two seamlessly?
Btw I dont need a dynamic sync. I wont be working on both simultaneously. Ill probably work on my comp. Them sync it with laptop and continue working there when im out and then sync with pc when im back..
Actually, source control might be a pretty good solution here.
In particular, using a distributed source control like git or Mercurial could be a pretty good route, because they both don't require setting up a Subversion server (one can create a repo right from Eclipse! -- see below regarding plugins), and merging between repositories are very easy.
To make matters easier, that there are plugins available for Eclipse which integrates with git (e.g. EGit) and Mercurial (e.g. MercurialEclipse). Both are easily installable using the Eclipse Marketplace feature in Eclipse Helios (3.6).
If you're not using source control, might as well make this an opportunity to start using one! :)
If you really don't want to use source control (which is useful, I use mercurial), try DropBox, or Windows Live Mesh. Both can sync over LAN without an internet connection, AFAIK. (Definitely DropBox, anyway)
Both are free.
(P.S. if you're interested in checking out DropBox, use this link, and we'll both get extra free storage space https://www.dropbox.com/referrals/NTkxNzM4MjU5?src=global0)
I dont think that using SVN in your case is an overkill. You can setup either laptop or desktop as SVN server and both instances of eclipse as SVN clients. Besides sync you will get added benefits of having change log, ability to roll back and all other bells and whistles of a source code repository.
We're about to look at implementing some PHP Coding Standards in our workplace to add some consistency between all of our developers.
I've read around and seen Zend and PEAR standards etc, but what's the best way to enforce these?
I've found a PHP Codesniffer plugin for netbeans, but are there any other ways I could enforce a standard, possibly CI (Continuous Integration) / Hudson or even when committing to SVN?
I was just wondering If anyone had experience or any other tools/methods I could look into?
Thanks
CodeSniffer is indeed the best tool for this.
There is a number of ways to use it:
integrating into Eclipse
integrate as pre-commit hook in you VCS
integrating into your CI Server
Disclaimer: the linked pages are just random picks from Google on that topic. They are not to suggest to use Eclipse, SVN or Hudson. Use what you think is appropriate for your development environment.
Also see http://www.qatools.org for additional tools.
I always wanted to perform code beautification on each SVN commit via SVN hooks.
Still belive it's the best & most efficient way.
Currently all team members just know that XXX is approved code beautifier and everyone supposed to use it.
At 2017 you have basically 3 options:
From oldest to newest (by features and codebase):
PHP_CodeSniffer
PHP CS Fixer
EasyCodingStandard - connects them both in super easy to understand way
I've installed Eclipse 3.5.1 (PDE), which I believe I got from Zend's download site (it was a while ago on my travel laptop). I can't get auto-complete to work for any of my included libraries. I've tried both adding the libraries to the 'include path' and just linking the files to a subdirectory of the project. Neither gets me auto-complete of the library classes.
My normal development system has an older version of Eclipse which I don't update, because it currently works well, and I fear an update will change that. I find configuring eclipse more work that actual coding, and more voodoo that mod_rewrite. I doubt I'm alone.
Any secret to getting auto-complete working?
No you're definitely not alone! I have experienced this problem in many installations of Eclipse (after updates and such etc etc). Try running Build Project. I know that solution has worked in some instances for me. My last installation I was running Eclipse Galileo and once I finally got the intellisense to at least work it was extremely slow. I tried lowering the time delay for the intellisense which helped in php files (still had a 1.5 second delay at least) but made it way over-sensative in my view scripts for example.
I finally bit the bullet and switched to Zend Studio 8. (At least they've knocked the price down $100 haha).
Eclipse has a quirky auto-complete but the Zend one is excellent! :)
You can add a PHP library to the project in Project properties/PHP Include Path/Libraries. After that, autocomplete will index all php files in that directory.
Maybe it's not the best solution for you, because it doesn't care about whether the file is included or not in the given script. If I include /usr/share/pear, and now I see all PEAR libs' functions everywhere.