r/PHPhelp • • Jun 05 '20

Your favourite tools for PHP web projects

Hello,
let's say you are going to make a smaller web project (work for 1-2 weeks) in PHP. What tools/technologies are you going to use no mather what?

It should be:

  1. Framework independend (no Symfony vs Laravel vs CodeIgniter wars please)

  2. IDE independent

  3. Project independent (no mather what web project you do, you use these technologies/tools)

Thanks for your tips :-)

12 Upvotes

26 comments sorted by

12

u/[deleted] Jun 05 '20

Coffee and alcohol. If any JS is involved then I might need some paint to huff.

1

u/michalmcz Jun 05 '20

:-D ... In my country, Kratom is legal, it's also very nice stuff for programming (better than coffee)

1

u/Wiwwil Jun 05 '20

Kratom ?

2

u/michalmcz Jun 05 '20 edited Jun 05 '20

It's herb a little similar to the coffee plant.
Simplified procedure: You make tea from the powdered herb and drink it including the powder. It has stimulation effects lasting several hours :-)

https://en.wikipedia.org/wiki/Mitragyna_speciosa

2

u/Wiwwil Jun 05 '20

Thanks now I want it

2

u/michalmcz Jun 05 '20

About stimulants (coffee, kratom) I can also recommend stimulant-music :-P

...but I guess everybody here already knows them

→ More replies (1)

4

u/michalmcz Jun 05 '20

So for example for me it would be:

  • Git

  • Git-flow

  • Composer

  • Phinx (database migration tool)

  • Bower & Gulp

  • FTP-deployment

...maybe some of you will use Docker, Selenium, some kind of unit-testing tool, etc.

1

u/SomeOtherGuySits Jun 05 '20

Does FTP-deployment work for a small team? I see the md5s are stored, but do the hashes ignore timestamps / perms that vary between devs?

1

u/michalmcz Jun 05 '20

do the hashes ignore timestamps / perms that vary between devs

From what I know, yes. It calculates md5 from files content only.

I've used it several times with other people (also with different OS) and everything worked just fine.

2

u/Kit_Saels Jun 05 '20 edited Jun 05 '20
  • PHP

  • PHPUnit

  • MySQL (over PDO)

  • Javascript

  • CSS

  • XSLT (class XSLTProcessor)

  • xsltproc (for unit testing XSLT)

  • Git

  • GNU Make

  • Vim

2

u/michalmcz Jun 05 '20

Can you please link the "Make" tool? It's really hard to google tool with such a name :-D

7

u/andoril Jun 05 '20

Phpunit

Built in webserver for local development.

psalm for static code analysis

sqlite for dev db (I usually use an ORM like doctrine, so switching to mySQL for production is usually not an issue)

Packages from different sources. I tend to use modules that are PSR compliant more often than others. See thephpleague for examples. Laminas modules are good as well. And don't forget to take a look at symfony modules.

As for frameworks I try to use microframeworks instead of the big ones. I used the slim framework a lot in past projects but I'm making a change to mezzio right now.

Beanstalk as a job system.

Vim and phpstorm (with vim plugin) as my editors/ides of choice.

You can also search for "Tools of the trade" by Sebastian Bergmann. He's the creator and maintainer of phpunit and "Tools of the trade" is a talk from him about your question^

EDIT: I forgot to add the two most common ones: git for VCS and composer for dependency management.

1

u/halfercode Jun 05 '20

Interesting thread, but let's not restrict what people are allowed to say. If someone has a framework they like, they should be at liberty to add it.

1

u/michalmcz Jun 05 '20

I don't mind specific-purpose frameworks like PHPUnit or jQuery. But complete frameworks for web projects (like Symfony or Laravel) are big topic, better for separate discussion IMO.

1

u/[deleted] Jun 05 '20

Seems like a bit of overkill for small projects here. Personally I would use php, visual studio code, maybe github and a SQLite dB or MySQL if shared.

1

u/michalmcz Jun 05 '20 edited Jun 05 '20

Wouldn't you even use Git, for 2 weeks long project? And no Composer for downloading libraries & dependencies?

→ More replies (1)

2

u/Wiwwil Jun 05 '20 edited Jun 05 '20

I know you said no Framework, I am sorry. I would go with Symfony. It just is personnal preference. I won't comment any further on it as op asked.

DB :

  • PostgreSQL

Front (not in PHP but I still would use it and I feel it is relevant) :

  • ReactJS

  • Typescript

  • Redux most likely

  • Webpack (Encore) or Webpack

  • Sass, Material UI or Tailwind CSS or Bootstrap

1

u/[deleted] Jun 05 '20

I've got a Symfony project I'm working on that I will soon need to connect to a companies API to send and receive data. Is API Platform something I should look in to using? Or is that more for if you are building an API end point to your own application? I just assumed I would need to code out a few various functions to their API call that I would need.

→ More replies (1)

1

u/cichy86 Jun 05 '20

Idk with which framework i Will go but for the rest techs i Will go with mysql db, composer, PHPunit, git, and probably docker for dev environment

1

u/[deleted] Jun 05 '20
  • phpunit

  • phpstan

  • composer

  • eloquent orm (even though it's a laravel package, you can use it in non-laravel projets)

1

u/_odan Jun 05 '20
  • Slim (for routing)

  • Composer (for all dependencies and the autoloader)

  • MySQL or MariaDB

  • Phpstan and PHPUnit

  • Github

  • Xampp or Docker

  • PHP-DI

  • Phinx for schema migrations

  • Apache Ant to build an deployment artifact

Frontend

  • Webpack

  • Bootstrap

  • and many more

1

u/jenshaase Jun 05 '20

I would use Respect/Validation for input validation.