chore: change from php-fpm to frankenphp
Fixes https://github.com/ecamp/ecamp3/issues/4453 Changes from php-fpm to frankenphp + take over any other useful change from official api-platform template.
For a diff of all upstream changes since our last sync see https://github.com/api-platform/api-platform/compare/7642f8639ff1d95cfa48832db0221973559f8d29...v3.3.2
Open To Dos:
- [x] Fix xdebug
- [ ] Test on different local machines
- [x] Test deployment (manually deployed unter https://pr5123-manual-1.ecamp3.ch/)
Excluded from this PR:
- Worker mode (runtime mode)
- Upgrade to postgres 16
- api platform config
rfc_7807_compliant_errors(upstream istrue; kept atfalse) - doctrine config
validate_xml_mapping(upstream istrue; kept atfalse) - upstream switched from
phpdocumentor/reflection-docblocktophpstan/phpdoc-parser(this generated wrong API responses; didn't debug further) - Some renaming of files to keep review of the changes a bit simpler. We could still do these renamings afterwards in a separate PR (
docker-compose.ymlis nowcompose.yml;api-platform.iniis nowapp.ini; etc.)
xdebug
In upstream, the default working folder has changed from /srv/api to /app.
In order for debugging to work again, I had to change the pathMappings in my debug config in VScode.
In other IDEs, something similar might be needed in order to find the correct sources.
Alterative would be that we stick to /srv/api instead of /app.
Old .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "XDebug: eCamp API",
"type": "php",
"request": "launch",
"hostname": "localhost",
"port": 9003,
"log": true,
"pathMappings": {
"/srv/api": "${workspaceRoot}/api"
}
}
]
}
New .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "XDebug: eCamp API",
"type": "php",
"request": "launch",
"hostname": "localhost",
"port": 9003,
"log": true,
"pathMappings": {
"/app": "${workspaceRoot}/api"
}
}
]
}
Very cool. I will look at it as soon as the caching PR is through.
Just tested on macOS. To quote a famous coder above:
works on my machine :)
, too!