Comments (14)
DDEV might be overkill, especially for projects that are not supported - I have always defaulted to using this PPA https://launchpad.net/~ondrej/+archive/ubuntu/php on Ubuntu installs to get the latest version of PHP.
Since Ruby and Go are installed on the system with mise, might make sense to also install PHP on the system?
from omakub.
Maybe we start simple. ondrej + composer. Which extensions should be included?
from omakub.
I think the philosophy here is to be as straightforward as possible, rather than relying on Docker. PHP runs perfectly fine with the apt packages and it's the default installation any newcomer would expect / be able to debug on their own
from omakub.
DDEV is, without question, the tool for this (and many other) job
It is written in Go and is docker-based, supports like 20 CMSs, different languages (php, js, python - I see no reason why it couldn't also support ruby), does SSL, allows sharing via public domain, works across OSs, has strong corporate backing but also a non-profit foundation, etc...
For PHP, in particular, it allows you to seamlessly toggle debugging and profiling tools like xdebug, xhprof, etc...
Easy to add different databases, search engines, etc...
I only discovered it last week, but I cannot speak highly enough of it. It's painful to think of the amount of hassle it could have saved me over the years
from omakub.
PHP installed via APT should be enough for execution of some random scripts when you need an PHP interpreter.
But for actual projects, having a complete dedicated environment is a must. DDEV is the de-facto standard for this. You install it once globally and then use it to create an environment for each project you're working on.
https://ddev.readthedocs.io/en/latest/users/quickstart/#laravel
I've been using it for a few projects (php7.4, 8.2 and 8.3), it's great. You can customize it with custom scripts and Dockerfiles.
Another great environment I used a lot (~4 years) is https://github.com/markshust/docker-magento - this one is specific to Magento 2 though and is a better choice for it than DDEV.
from omakub.
Good point @nickchomey, I still think its overkill for installing PHP on the system
from omakub.
IMO, the best way to get PHP is via ppa:ondrej/php
. It's becoming a standard practice on the server as everyone trusts this repo and it's good.
Additionally, the fork of Laravel Valet for Linux exists, but it would probably be overkill because it installs Nginx and DnsMasq.
from omakub.
I have a very simple setup on my fork, works like a charm since my install 3 days ago: https://github.com/florentdestremau/omakub/blob/master/install/php.sh
I'm a Symfony developper so I don't have a good idea of where Laravel might need some tweaks, and it includes extensions that are specific for my project (and some choices such as db drivers).
It also includes the Symfony console so that's framework-specific too.
from omakub.
For Laravel, one of the easiest way to setup a complete dev environment is to use Sail which packages all the docker dependencies for each project.
Otherwise, LEMP stack is still one of the most used stack.
from omakub.
This installs the current PHP and Composer:
sudo apt install php-fpm php-cli php-xml php-mbstring php-intl
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
But if you need an other PHP version or multiple versions I guess DDEV is better, but I never used it. Maybe PHP should be in the optional folder?
from omakub.
DDEV might be overkill, especially for projects that are not supported
DDEV works for any php project with its default php
project type. https://ddev.readthedocs.io/en/stable/users/project/`
from omakub.
I think it's worth considering using Valet instead of Sail. Or at least give both options.
I started out with Sail myself but after a while I find Valet and Herd to be better for local development for Laravel.
from omakub.
Maybe we start simple. ondrej + composer. Which extensions should be included?
I agree, PR #87 is installing that.
from omakub.
I added very basic ones with the 3 main db drivers. Doesn't hurt to put too much extensions but I guess it could scare some people away ? We're back to the debat on having all defaults vs "bundles" of dev environments. IMO I would keep the minimal, most projects have their own README::Install anyways, and most frameworks for beginners have their own self check as well.
from omakub.
Related Issues (20)
- Updating HOT 1
- top bar missing after resuming in VMware Workstation Pro HOT 4
- Cascadia code HOT 1
- WhatsApp Icon / Installing PWA HOT 1
- Menu Bar Items Disappear HOT 3
- rails doesn't see provided dockerized postgresql HOT 4
- Workspace indicator and top bar flickers randomly. HOT 1
- order for install languages HOT 1
- Install issue `gum` command not found HOT 2
- Installation fails with `dpkg` error on fresh Ubuntu 24.04 HOT 4
- ctrl + backspace is mapped to move option in terminal HOT 1
- Consider adding Zed HOT 3
- Dock Docs HOT 1
- why there is nothing work after run this script ? HOT 15
- Fix Gum installer to use a path that's version agnostic HOT 1
- Flameshot not closing when Esc button pressed HOT 2
- `gsetting set` not working after installing Omakub HOT 1
- chrome-gnome-shell should be installed HOT 1
- gnome top panel dissapears HOT 2
- ls dose not showing hidden dirs (dirs starting with .)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omakub.