menu
up-caret
down-caret

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

# General

General Chatter

Trending conversations
503 on deployment
@codelayer · 22d
BRU1 instances are timing out
@helguita · 31d
Images not showing on CRA deployment
@passingmagic · 4h
$ now --target doing nothing
@spy-seth · 13h
Deploying Node v6
@mkern · 34d

Now v2 is not suitable for PHP :/

ZEIT/General · November 10, 2018 at 2:54am

Now v2 is not suitable for PHP :/

November 10, 2018 at 2:54am
  • Current Now v2 PHP builder does not support multiple files, which makes it impossible to run any significant PHP app.
  • There are plans to support multiple files by using static analysis, but it makes no sense since PHP was designed to autoload files on demand and most PHP frameworks are resolving dependencies at runtime (e.g in CQRS apps when you dispatch a command to your command bus, it resolves the command handler based on command)
  • All modern PHP frameworks requires a single entrypoint (index.php) to be able to share code between routes.
  • Most PHP apps require installing PHP extensions that are not included in default PHP distribution. With Dockerfile it was possible to compile your custom PHP binary by adding extensions and custom php.ini. With Now v2 this is not possible anymore.
  • Yeah we can always create custom Now v2 builders, but it means vendor lockin. If tomorrow we decide to deploy somewhere else your builder won't work there.
  • Apps based on modern PHP frameworks such as Symfony, Laravel and ZF will need to rewrite most of their code to adapt to Now v2 lambda style. The serverless lambda is not just a way to deploy, but a way to design the app. If you drop Docker support you'll simply drop a lot of customers that don't want to rewrite their apps.
No messages yet